diff --git a/homeassistant/components/honeywell/switch.py b/homeassistant/components/honeywell/switch.py index 4aebde76727..53a9b27ee72 100644 --- a/homeassistant/components/honeywell/switch.py +++ b/homeassistant/components/honeywell/switch.py @@ -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}"