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:
@@ -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}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user