Add icon translations to Switcher kis (#112296)

This commit is contained in:
Joost Lekkerkerker 2024-03-05 11:34:18 +01:00 committed by GitHub
parent 2e65952eae
commit 33c1e7d45d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 30 additions and 6 deletions

View file

@ -48,7 +48,6 @@ THERMOSTAT_BUTTONS = [
SwitcherThermostatButtonEntityDescription(
key="assume_on",
translation_key="assume_on",
icon="mdi:fan",
entity_category=EntityCategory.CONFIG,
press_fn=lambda api, remote: api.control_breeze_device(
remote, state=DeviceState.ON, update_state=True
@ -58,7 +57,6 @@ THERMOSTAT_BUTTONS = [
SwitcherThermostatButtonEntityDescription(
key="assume_off",
translation_key="assume_off",
icon="mdi:fan-off",
entity_category=EntityCategory.CONFIG,
press_fn=lambda api, remote: api.control_breeze_device(
remote, state=DeviceState.OFF, update_state=True
@ -68,7 +66,6 @@ THERMOSTAT_BUTTONS = [
SwitcherThermostatButtonEntityDescription(
key="vertical_swing_on",
translation_key="vertical_swing_on",
icon="mdi:autorenew",
press_fn=lambda api, remote: api.control_breeze_device(
remote, swing=ThermostatSwing.ON
),
@ -77,7 +74,6 @@ THERMOSTAT_BUTTONS = [
SwitcherThermostatButtonEntityDescription(
key="vertical_swing_off",
translation_key="vertical_swing_off",
icon="mdi:autorenew-off",
press_fn=lambda api, remote: api.control_breeze_device(
remote, swing=ThermostatSwing.OFF
),

View file

@ -0,0 +1,30 @@
{
"entity": {
"button": {
"assume_on": {
"default": "mdi:fan"
},
"assume_off": {
"default": "mdi:fan-off"
},
"vertical_swing_on": {
"default": "mdi:autorenew"
},
"vertical_swing_off": {
"default": "mdi:autorenew-off"
}
},
"sensor": {
"remaining_time": {
"default": "mdi:av-timer"
},
"auto_shutdown": {
"default": "mdi:progress-clock"
}
}
},
"services": {
"set_auto_off": "mdi:progress-clock",
"turn_on_with_timer": "mdi:timer"
}
}

View file

@ -40,12 +40,10 @@ TIME_SENSORS: list[SensorEntityDescription] = [
SensorEntityDescription(
key="remaining_time",
translation_key="remaining_time",
icon="mdi:av-timer",
),
SensorEntityDescription(
key="auto_off_set",
translation_key="auto_shutdown",
icon="mdi:progress-clock",
entity_registry_enabled_default=False,
),
]