mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Refactor flexit_bacnet to use icon translations (#110479)
This commit is contained in:
parent
e2ff5bc248
commit
f7c43710dc
@ -31,6 +31,14 @@
|
|||||||
"home_supply_fan_setpoint": {
|
"home_supply_fan_setpoint": {
|
||||||
"default": "mdi:fan-plus"
|
"default": "mdi:fan-plus"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"switch": {
|
||||||
|
"electric_heater": {
|
||||||
|
"default": "mdi:radiator",
|
||||||
|
"state": {
|
||||||
|
"off": "mdi:radiator-off"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,6 @@ SWITCHES: tuple[FlexitSwitchEntityDescription, ...] = (
|
|||||||
FlexitSwitchEntityDescription(
|
FlexitSwitchEntityDescription(
|
||||||
key="electric_heater",
|
key="electric_heater",
|
||||||
translation_key="electric_heater",
|
translation_key="electric_heater",
|
||||||
icon="mdi:radiator",
|
|
||||||
is_on_fn=lambda data: data.electric_heater,
|
is_on_fn=lambda data: data.electric_heater,
|
||||||
turn_on_fn=lambda data: data.enable_electric_heater(),
|
turn_on_fn=lambda data: data.enable_electric_heater(),
|
||||||
turn_off_fn=lambda data: data.disable_electric_heater(),
|
turn_off_fn=lambda data: data.disable_electric_heater(),
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
'options': dict({
|
'options': dict({
|
||||||
}),
|
}),
|
||||||
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
|
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
|
||||||
'original_icon': 'mdi:radiator',
|
'original_icon': None,
|
||||||
'original_name': 'Electric heater',
|
'original_name': 'Electric heater',
|
||||||
'platform': 'flexit_bacnet',
|
'platform': 'flexit_bacnet',
|
||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
@ -35,7 +35,6 @@
|
|||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'switch',
|
'device_class': 'switch',
|
||||||
'friendly_name': 'Device Name Electric heater',
|
'friendly_name': 'Device Name Electric heater',
|
||||||
'icon': 'mdi:radiator',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'switch.device_name_electric_heater',
|
'entity_id': 'switch.device_name_electric_heater',
|
||||||
@ -49,7 +48,6 @@
|
|||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'switch',
|
'device_class': 'switch',
|
||||||
'friendly_name': 'Device Name Electric heater',
|
'friendly_name': 'Device Name Electric heater',
|
||||||
'icon': 'mdi:radiator',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'switch.device_name_electric_heater',
|
'entity_id': 'switch.device_name_electric_heater',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user