Add icon translations to Energyzero (#111513)

* Add icon translations to Energyzero

* Add icon translations to Energyzero
pull/111666/head
Joost Lekkerkerker 2024-02-27 23:41:07 +01:00 committed by GitHub
parent c4d719a7cf
commit 9cf874d4a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 4 deletions

View File

@ -0,0 +1,16 @@
{
"entity": {
"sensor": {
"percentage_of_max": {
"default": "mdi:percent"
},
"hours_priced_equal_or_lower": {
"default": "mdi:clock"
}
}
},
"services": {
"get_gas_prices": "mdi:gas-station",
"get_energy_prices": "mdi:lightning-bolt"
}
}

View File

@ -117,7 +117,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
translation_key="percentage_of_max",
service_type="today_energy",
native_unit_of_measurement=PERCENTAGE,
icon="mdi:percent",
value_fn=lambda data: data.energy_today.pct_of_max_price,
),
EnergyZeroSensorEntityDescription(
@ -125,7 +124,6 @@ SENSORS: tuple[EnergyZeroSensorEntityDescription, ...] = (
translation_key="hours_priced_equal_or_lower",
service_type="today_energy",
native_unit_of_measurement=UnitOfTime.HOURS,
icon="mdi:clock",
value_fn=lambda data: data.energy_today.hours_priced_equal_or_lower,
),
)

View File

@ -674,7 +674,6 @@
'attributes': ReadOnlyDict({
'attribution': 'Data provided by EnergyZero',
'friendly_name': 'Energy market price Hours priced equal or lower than current - today',
'icon': 'mdi:clock',
'unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
}),
'context': <ANY>,
@ -707,7 +706,7 @@
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:clock',
'original_icon': None,
'original_name': 'Hours priced equal or lower than current - today',
'platform': 'energyzero',
'previous_unique_id': None,