Add icon translations to Husqvarna automower (#111727)

* Add icon translations to Husqvarna automower

* fix
This commit is contained in:
Joost Lekkerkerker 2024-03-10 21:55:31 +01:00 committed by GitHub
parent c1d1479bde
commit d9f6e4be24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 6 deletions

View File

@ -0,0 +1,12 @@
{
"entity": {
"sensor": {
"number_of_charging_cycles": {
"default": "mdi:battery-sync-outline"
},
"number_of_collisions": {
"default": "mdi:counter"
}
}
}
}

View File

@ -105,7 +105,6 @@ SENSOR_TYPES: tuple[AutomowerSensorEntityDescription, ...] = (
AutomowerSensorEntityDescription(
key="number_of_charging_cycles",
translation_key="number_of_charging_cycles",
icon="mdi:battery-sync-outline",
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.TOTAL,
value_fn=lambda data: data.statistics.number_of_charging_cycles,
@ -113,7 +112,6 @@ SENSOR_TYPES: tuple[AutomowerSensorEntityDescription, ...] = (
AutomowerSensorEntityDescription(
key="number_of_collisions",
translation_key="number_of_collisions",
icon="mdi:counter",
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.TOTAL,
value_fn=lambda data: data.statistics.number_of_collisions,

View File

@ -234,7 +234,7 @@
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:battery-sync-outline',
'original_icon': None,
'original_name': 'Number of charging cycles',
'platform': 'husqvarna_automower',
'previous_unique_id': None,
@ -248,7 +248,6 @@
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Mower 1 Number of charging cycles',
'icon': 'mdi:battery-sync-outline',
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'context': <ANY>,
@ -283,7 +282,7 @@
'options': dict({
}),
'original_device_class': None,
'original_icon': 'mdi:counter',
'original_icon': None,
'original_name': 'Number of collisions',
'platform': 'husqvarna_automower',
'previous_unique_id': None,
@ -297,7 +296,6 @@
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Test Mower 1 Number of collisions',
'icon': 'mdi:counter',
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'context': <ANY>,