mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Flexit BACnet: Cooker hood mode support (#138229)
This commit is contained in:
parent
31ea2e1714
commit
2784a28ef7
@ -47,6 +47,12 @@
|
||||
"state": {
|
||||
"off": "mdi:fireplace-off"
|
||||
}
|
||||
},
|
||||
"cooker_hood_mode": {
|
||||
"default": "mdi:kettle-steam",
|
||||
"state": {
|
||||
"off": "mdi:kettle"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,9 @@
|
||||
},
|
||||
"fireplace_mode": {
|
||||
"name": "Fireplace mode"
|
||||
},
|
||||
"cooker_hood_mode": {
|
||||
"name": "Cooker hood mode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,13 @@ SWITCHES: tuple[FlexitSwitchEntityDescription, ...] = (
|
||||
turn_on_fn=lambda data: data.trigger_fireplace_mode(),
|
||||
turn_off_fn=lambda data: data.trigger_fireplace_mode(),
|
||||
),
|
||||
FlexitSwitchEntityDescription(
|
||||
key="cooker_hood_mode",
|
||||
translation_key="cooker_hood_mode",
|
||||
is_on_fn=lambda data: data.cooker_hood_status,
|
||||
turn_on_fn=lambda data: data.activate_cooker_hood(),
|
||||
turn_off_fn=lambda data: data.deactivate_cooker_hood(),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
@ -1,4 +1,52 @@
|
||||
# serializer version: 1
|
||||
# name: test_switches[switch.device_name_cooker_hood_mode-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': None,
|
||||
'entity_id': 'switch.device_name_cooker_hood_mode',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SwitchDeviceClass.SWITCH: 'switch'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Cooker hood mode',
|
||||
'platform': 'flexit_bacnet',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'cooker_hood_mode',
|
||||
'unique_id': '0000-0001-cooker_hood_mode',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switches[switch.device_name_cooker_hood_mode-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'switch',
|
||||
'friendly_name': 'Device Name Cooker hood mode',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.device_name_cooker_hood_mode',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switches[switch.device_name_electric_heater-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
Loading…
x
Reference in New Issue
Block a user