Skip to content

Commit b7b7840

Browse files
committed
Fix lint
1 parent c10bdb7 commit b7b7840

File tree

6 files changed

+373
-380
lines changed

6 files changed

+373
-380
lines changed

.github/workflows/hassfest.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ jobs:
88
validate:
99
runs-on: "ubuntu-latest"
1010
steps:
11-
- uses: "actions/checkout@v4"
12-
- uses: "home-assistant/actions/hassfest@master"
11+
- uses: "actions/checkout@v4"
12+
- uses: "home-assistant/actions/hassfest@master"

README.md

+8-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# Enedis gateway
2+
23
[![hacs_badge](https://img.shields.io/badge/HACS-Custom-orange.svg)](https://github.com/custom-components/hacs)
34
![GitHub release](https://img.shields.io/github/release/Cyr-ius/hass-myelectricaldata)
45

5-
This a *custom component* for [Home Assistant](https://www.home-assistant.io/).
6+
This a _custom component_ for [Home Assistant](https://www.home-assistant.io/).
67

7-
With Enedis, get datas from [MyElectricalData](https://myelectricaldata.fr)
8+
With Enedis, get data from [MyElectricalData](https://myelectricaldata.fr)
89

910
There is currently support for the following device types within Home Assistant:
10-
* Power_sensor
11-
* Cost sensor
12-
* Data for HA Energy graph
1311

12+
- Power_sensor
13+
- Cost sensor
14+
- Data for HA Energy graph
15+
16+
### HACS
1417

15-
### HACS
1618
Once HACS is installed, click on the 3 dots at the top right
1719

1820
Add custom repositories
1921

2022
Integration : https://github.com/Cyr-ius/hass-myelectricaldata
2123

22-
2324
## Features
2425

2526
- Supports the consumption and production of Linky meters
@@ -30,30 +31,22 @@ Add custom repositories
3031

3132
- Possibility to add a specific price on a time slot
3233

33-
3434
## Configuration
3535

3636
The preferred way to setup the platform is by enabling the discovery component.
3737
Add your equipment via the Integration menu
3838

3939
[![Open your Home Assistant instance and start setting up a new integration.](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start/?domain=myelectricaldata)
4040

41-
4241
### Within the Options menu:
4342

4443
Days ranges must be set from midnight to midnight - 1. (00:00:00 - 23:59:59)
4544

4645
Example :
4746
My contract stipulates off-peak hours from 01H30 to 08H00 and from 12H30 to 14H30.
4847

49-
5048
![image](https://user-images.githubusercontent.com/1258123/233062369-ab7e4c4d-026e-4239-87c2-8053d3f005cc.png)
5149
![image](https://user-images.githubusercontent.com/1258123/233062469-d8b3bd9e-ea52-4a2d-bba2-026ec6b8c0d3.png)
5250
![image](https://user-images.githubusercontent.com/1258123/233062536-4082587d-9993-4ece-9d03-c3c10f8195ba.png)
5351
![image](https://user-images.githubusercontent.com/1258123/233062609-4bc02fbc-6243-40c1-9723-0ea186df28fc.png)
5452
![image](https://user-images.githubusercontent.com/1258123/233062682-f68706ec-1178-43e1-b8e5-979ce5bb5d10.png)
55-
56-
57-
58-
59-

custom_components/myelectricaldata/services.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enedis service.
22
fetch_data:
3-
name: Fetch datas
3+
name: Fetch data
44
description: Fetch and add data in statistics database
55
fields:
66
entry:
@@ -12,7 +12,7 @@ fetch_data:
1212
integration: myelectricaldata
1313
service:
1414
name: Service
15-
description: Type of data to retrieve
15+
description: Type of data to retrieve
1616
required: true
1717
default: daily_production
1818
selector:
@@ -22,7 +22,7 @@ fetch_data:
2222
- label: Daily Consumption
2323
value: daily_consumption
2424
- label: Detail Consumption
25-
value: consumption_load_curve
25+
value: consumption_load_curve
2626
- label: Daily Production
2727
value: daily_production
2828
- label: Detail Production
@@ -46,23 +46,23 @@ fetch_data:
4646
selector:
4747
number:
4848
min: 0
49-
max: 100
50-
step: 0.001
51-
mode: box
49+
max: 100
50+
step: 0.001
51+
mode: box
5252
off_price:
5353
name: Offpeak Price
5454
description: Offpeak Price (Only if detailed mode)
5555
required: false
5656
selector:
5757
number:
5858
min: 0
59-
max: 100
59+
max: 100
6060
step: 0.001
61-
mode: box
61+
mode: box
6262

6363
# Enedis service.
6464
clear_data:
65-
name: Clear datas
65+
name: Clear data
6666
description: clear data statistics in your database
6767
fields:
6868
statistic_id:
+117-117
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,123 @@
11
{
2-
"config": {
3-
"flow_title": "{name}",
4-
"step": {
5-
"user": {
6-
"title": "Register Enedis gateway account",
7-
"description": "To start the collection, it is necessary to make the settings via the options.",
8-
"data": {
9-
"pdl": "pdl",
10-
"token": "token",
11-
"ecowatt": "Enable Ecowatt sensor",
12-
"tempo": "Tempo subscription",
13-
"production": "Enable daily production sensor",
14-
"consumption": "Enable daily consumption sensor"
15-
}
16-
}
17-
},
18-
"error": {
19-
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
20-
"unknown": "[%key:common::config_flow::error::unknown%]"
21-
},
22-
"abort": {
23-
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
2+
"config": {
3+
"flow_title": "{name}",
4+
"step": {
5+
"user": {
6+
"title": "Register Enedis gateway account",
7+
"description": "To start the collection, it is necessary to make the settings via the options.",
8+
"data": {
9+
"pdl": "pdl",
10+
"token": "token",
11+
"ecowatt": "Enable Ecowatt sensor",
12+
"tempo": "Tempo subscription",
13+
"production": "Enable daily production sensor",
14+
"consumption": "Enable daily consumption sensor"
2415
}
16+
}
2517
},
26-
"options": {
27-
"step": {
28-
"init": {
29-
"title": "Enedis options",
30-
"menu_options": {
31-
"authentication": "Authentication",
32-
"production": "Production",
33-
"consumption": "Consumption",
34-
"save": "Save & Exit"
35-
}
36-
},
37-
"authentication": {
38-
"title": "Authentication",
39-
"data": {
40-
"token": "Token",
41-
"ecowatt": "Enable Ecowatt sensor",
42-
"tempo": "Enable Tempo day sensor"
43-
}
44-
},
45-
"production": {
46-
"title": "Production",
47-
"data": {
48-
"step_id": "Service",
49-
"price":"Price"
50-
}
51-
},
52-
"consumption": {
53-
"title": "Consumption",
54-
"data": {
55-
"step_id": "Service",
56-
"s_blue":"Price BLUE: full hour",
57-
"s_white":"Price WHITE: full hour",
58-
"s_red":"Price RED: full hour",
59-
"o_blue":"Price BLUE: off-peak hour",
60-
"o_white":"Price WHITE: off-peak hour",
61-
"o_red":"Price RED: off-peak hour",
62-
"price":"Price: full hour",
63-
"off_price":"Price: off-peak hour",
64-
"interval_new_id":"Add new offpeak range"
65-
}
66-
},
67-
"rules": {
68-
"title": "Add new range",
69-
"description": "Add new range for tarification",
70-
"data": {
71-
"rule_id": "Rule id",
72-
"step_id": "Service",
73-
"rule_start_time": "Start time",
74-
"rule_end_time": "End time",
75-
"rule_delete": "Delete this range"
76-
}
77-
}
78-
},
79-
"error": {
80-
"syntax_error": "Syntax Error",
81-
"time_error": "Start time is greater than end time",
82-
"interval_time_error": "Minutes are not multiples of 30min"
83-
}
18+
"error": {
19+
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
20+
"unknown": "[%key:common::config_flow::error::unknown%]"
8421
},
85-
"selector": {
86-
"consumption_choice": {
87-
"options": {
88-
"daily": "Daily",
89-
"detail": "Detail"
90-
}
91-
},
92-
"production_choice": {
93-
"options": {
94-
"daily": "Daily",
95-
"detail": "Detail"
96-
}
97-
},
98-
"interval_key": {
99-
"options": {
100-
"add_new_interval": "Add new interval"
101-
}
102-
}
22+
"abort": {
23+
"already_configured": "[%key:common::config_flow::abort::already_configured_service%]"
24+
}
25+
},
26+
"options": {
27+
"step": {
28+
"init": {
29+
"title": "Enedis options",
30+
"menu_options": {
31+
"authentication": "Authentication",
32+
"production": "Production",
33+
"consumption": "Consumption",
34+
"save": "Save & Exit"
35+
}
36+
},
37+
"authentication": {
38+
"title": "Authentication",
39+
"data": {
40+
"token": "Token",
41+
"ecowatt": "Enable Ecowatt sensor",
42+
"tempo": "Enable Tempo day sensor"
43+
}
44+
},
45+
"production": {
46+
"title": "Production",
47+
"data": {
48+
"step_id": "Service",
49+
"price": "Price"
50+
}
51+
},
52+
"consumption": {
53+
"title": "Consumption",
54+
"data": {
55+
"step_id": "Service",
56+
"s_blue": "Price BLUE: full hour",
57+
"s_white": "Price WHITE: full hour",
58+
"s_red": "Price RED: full hour",
59+
"o_blue": "Price BLUE: off-peak hour",
60+
"o_white": "Price WHITE: off-peak hour",
61+
"o_red": "Price RED: off-peak hour",
62+
"price": "Price: full hour",
63+
"off_price": "Price: off-peak hour",
64+
"interval_new_id": "Add new offpeak range"
65+
}
66+
},
67+
"rules": {
68+
"title": "Add new range",
69+
"description": "Add new range for tarification",
70+
"data": {
71+
"rule_id": "Rule id",
72+
"step_id": "Service",
73+
"rule_start_time": "Start time",
74+
"rule_end_time": "End time",
75+
"rule_delete": "Delete this range"
76+
}
77+
}
78+
},
79+
"error": {
80+
"syntax_error": "Syntax Error",
81+
"time_error": "Start time is greater than end time",
82+
"interval_time_error": "Minutes are not multiples of 30min"
83+
}
84+
},
85+
"selector": {
86+
"consumption_choice": {
87+
"options": {
88+
"daily": "Daily",
89+
"detail": "Detail"
90+
}
10391
},
104-
"entity": {
105-
"sensor": {
106-
"tempo": {
107-
"state": {
108-
"blue": "Blue",
109-
"white": "White",
110-
"red": "Red"
111-
}
112-
},
113-
"ecowatt": {
114-
"state": {
115-
"na": "Not available",
116-
"green": "Green",
117-
"orange": "Orange",
118-
"red": "Red"
119-
}
120-
}
92+
"production_choice": {
93+
"options": {
94+
"daily": "Daily",
95+
"detail": "Detail"
96+
}
97+
},
98+
"interval_key": {
99+
"options": {
100+
"add_new_interval": "Add new interval"
101+
}
102+
}
103+
},
104+
"entity": {
105+
"sensor": {
106+
"tempo": {
107+
"state": {
108+
"blue": "Blue",
109+
"white": "White",
110+
"red": "Red"
111+
}
112+
},
113+
"ecowatt": {
114+
"state": {
115+
"na": "Not available",
116+
"green": "Green",
117+
"orange": "Orange",
118+
"red": "Red"
121119
}
122-
}
123-
}
120+
}
121+
}
122+
}
123+
}

0 commit comments

Comments
 (0)