Skip to content

Commit cf73ef8

Browse files
Update easyEnergy exception and icon translations (home-assistant#170218)
1 parent 6555db1 commit cf73ef8

4 files changed

Lines changed: 31 additions & 1 deletion

File tree

homeassistant/components/easyenergy/coordinator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ async def _async_update_data(self) -> EasyEnergyData:
7676
)
7777

7878
except EasyEnergyConnectionError as err:
79-
raise UpdateFailed("Error communicating with easyEnergy API") from err
79+
raise UpdateFailed(
80+
translation_domain=DOMAIN,
81+
translation_key="connection_error",
82+
) from err
8083

8184
return EasyEnergyData(
8285
energy_today=energy_today,

homeassistant/components/easyenergy/icons.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
11
{
22
"entity": {
33
"sensor": {
4+
"average_price": {
5+
"default": "mdi:cash-multiple"
6+
},
7+
"current_hour_price": {
8+
"default": "mdi:cash"
9+
},
10+
"highest_price_time": {
11+
"default": "mdi:clock-outline"
12+
},
413
"hours_priced_equal_or_higher": {
514
"default": "mdi:clock"
615
},
716
"hours_priced_equal_or_lower": {
817
"default": "mdi:clock"
918
},
19+
"lowest_price_time": {
20+
"default": "mdi:clock-outline"
21+
},
22+
"max_price": {
23+
"default": "mdi:cash-plus"
24+
},
25+
"min_price": {
26+
"default": "mdi:cash-minus"
27+
},
28+
"next_hour_price": {
29+
"default": "mdi:cash"
30+
},
1031
"percentage_of_max": {
1132
"default": "mdi:percent"
1233
}

homeassistant/components/easyenergy/sensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
EasyEnergyDataUpdateCoordinator,
3232
)
3333

34+
# Coordinator is used to centralize the data updates
35+
PARALLEL_UPDATES = 0
36+
3437

3538
@dataclass(frozen=True, kw_only=True)
3639
class EasyEnergySensorEntityDescription(SensorEntityDescription):

homeassistant/components/easyenergy/strings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@
4747
}
4848
},
4949
"exceptions": {
50+
"connection_error": {
51+
"message": "Error communicating with the easyEnergy API."
52+
},
5053
"invalid_date": {
5154
"message": "Invalid date provided. Got {date}"
5255
}

0 commit comments

Comments
 (0)