1
0
mirror of https://github.com/home-assistant/core.git synced 2026-06-08 16:37:30 +01:00

Update easyEnergy exception and icon translations (#170218)

This commit is contained in:
Klaas Schoute
2026-05-10 08:19:18 +02:00
committed by GitHub
parent 6555db12b1
commit cf73ef8a20
4 changed files with 31 additions and 1 deletions
@@ -76,7 +76,10 @@ class EasyEnergyDataUpdateCoordinator(DataUpdateCoordinator[EasyEnergyData]):
)
except EasyEnergyConnectionError as err:
raise UpdateFailed("Error communicating with easyEnergy API") from err
raise UpdateFailed(
translation_domain=DOMAIN,
translation_key="connection_error",
) from err
return EasyEnergyData(
energy_today=energy_today,
@@ -1,12 +1,33 @@
{
"entity": {
"sensor": {
"average_price": {
"default": "mdi:cash-multiple"
},
"current_hour_price": {
"default": "mdi:cash"
},
"highest_price_time": {
"default": "mdi:clock-outline"
},
"hours_priced_equal_or_higher": {
"default": "mdi:clock"
},
"hours_priced_equal_or_lower": {
"default": "mdi:clock"
},
"lowest_price_time": {
"default": "mdi:clock-outline"
},
"max_price": {
"default": "mdi:cash-plus"
},
"min_price": {
"default": "mdi:cash-minus"
},
"next_hour_price": {
"default": "mdi:cash"
},
"percentage_of_max": {
"default": "mdi:percent"
}
@@ -31,6 +31,9 @@ from .coordinator import (
EasyEnergyDataUpdateCoordinator,
)
# Coordinator is used to centralize the data updates
PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True)
class EasyEnergySensorEntityDescription(SensorEntityDescription):
@@ -47,6 +47,9 @@
}
},
"exceptions": {
"connection_error": {
"message": "Error communicating with the easyEnergy API."
},
"invalid_date": {
"message": "Invalid date provided. Got {date}"
}