Add icon translations to EasyEnergy (#111413)

pull/111427/head
Joost Lekkerkerker 2024-02-25 22:46:33 +01:00 committed by GitHub
parent b3e10198dd
commit a2af3e5ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 4 deletions

View File

@ -0,0 +1,20 @@
{
"entity": {
"sensor": {
"percentage_of_max": {
"default": "mdi:percent"
},
"hours_priced_equal_or_lower": {
"default": "mdi:clock"
},
"hours_priced_equal_or_higher": {
"default": "mdi:clock"
}
}
},
"services": {
"get_gas_prices": "mdi:gas-station",
"get_energy_usage_prices": "mdi:transmission-tower-import",
"get_energy_return_prices": "mdi:transmission-tower-export"
}
}

View File

@ -117,7 +117,6 @@ SENSORS: tuple[EasyEnergySensorEntityDescription, ...] = (
translation_key="percentage_of_max",
service_type="today_energy_usage",
native_unit_of_measurement=PERCENTAGE,
icon="mdi:percent",
value_fn=lambda data: data.energy_today.pct_of_max_usage,
),
EasyEnergySensorEntityDescription(
@ -177,7 +176,6 @@ SENSORS: tuple[EasyEnergySensorEntityDescription, ...] = (
translation_key="percentage_of_max",
service_type="today_energy_return",
native_unit_of_measurement=PERCENTAGE,
icon="mdi:percent",
value_fn=lambda data: data.energy_today.pct_of_max_return,
),
EasyEnergySensorEntityDescription(
@ -185,7 +183,6 @@ SENSORS: tuple[EasyEnergySensorEntityDescription, ...] = (
translation_key="hours_priced_equal_or_lower",
service_type="today_energy_usage",
native_unit_of_measurement=UnitOfTime.HOURS,
icon="mdi:clock",
value_fn=lambda data: data.energy_today.hours_priced_equal_or_lower_usage,
),
EasyEnergySensorEntityDescription(
@ -193,7 +190,6 @@ SENSORS: tuple[EasyEnergySensorEntityDescription, ...] = (
translation_key="hours_priced_equal_or_higher",
service_type="today_energy_return",
native_unit_of_measurement=UnitOfTime.HOURS,
icon="mdi:clock",
value_fn=lambda data: data.energy_today.hours_priced_equal_or_higher_return,
),
)