mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
parent
f1dda8ef63
commit
f5b4637da8
@ -40,7 +40,7 @@ async def async_setup_entry(
|
||||
"""Set up the Honeywell switches."""
|
||||
data: HoneywellData = hass.data[DOMAIN][config_entry.entry_id]
|
||||
async_add_entities(
|
||||
HoneywellSwitch(hass, config_entry, device, description)
|
||||
HoneywellSwitch(data, device, description)
|
||||
for device in data.devices.values()
|
||||
if device.raw_ui_data.get("SwitchEmergencyHeatAllowed")
|
||||
for description in SWITCH_TYPES
|
||||
@ -54,13 +54,12 @@ class HoneywellSwitch(SwitchEntity):
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
honeywell_data: HoneywellData,
|
||||
device: SomeComfortDevice,
|
||||
description: SwitchEntityDescription,
|
||||
) -> None:
|
||||
"""Initialize the switch."""
|
||||
self._data = hass.data[DOMAIN][config_entry.entry_id]
|
||||
self._data = honeywell_data
|
||||
self._device = device
|
||||
self.entity_description = description
|
||||
self._attr_unique_id = f"{device.deviceid}_{description.key}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user