From 4e4c745c4f0ccb130a23f8122eaa68a7a1c95b9e Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 23 May 2022 04:44:11 +0200 Subject: [PATCH] Adjust setup type hints in honeywell (#72226) --- homeassistant/components/honeywell/climate.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/honeywell/climate.py b/homeassistant/components/honeywell/climate.py index 5c238d73e0b..11b899dc0f5 100644 --- a/homeassistant/components/honeywell/climate.py +++ b/homeassistant/components/honeywell/climate.py @@ -21,7 +21,10 @@ from homeassistant.components.climate.const import ( HVACAction, HVACMode, ) +from homeassistant.config_entries import ConfigEntry from homeassistant.const import ATTR_TEMPERATURE, TEMP_CELSIUS, TEMP_FAHRENHEIT +from homeassistant.core import HomeAssistant +from homeassistant.helpers.entity_platform import AddEntitiesCallback from .const import ( _LOGGER, @@ -70,12 +73,14 @@ HW_FAN_MODE_TO_HA = { PARALLEL_UPDATES = 1 -async def async_setup_entry(hass, config, async_add_entities, discovery_info=None): +async def async_setup_entry( + hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback +) -> None: """Set up the Honeywell thermostat.""" - cool_away_temp = config.options.get(CONF_COOL_AWAY_TEMPERATURE) - heat_away_temp = config.options.get(CONF_HEAT_AWAY_TEMPERATURE) + cool_away_temp = entry.options.get(CONF_COOL_AWAY_TEMPERATURE) + heat_away_temp = entry.options.get(CONF_HEAT_AWAY_TEMPERATURE) - data = hass.data[DOMAIN][config.entry_id] + data = hass.data[DOMAIN][entry.entry_id] async_add_entities( [