Skip to content

Commit

Permalink
chore: few more typing
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelli74 committed Aug 30, 2024
1 parent 3071a40 commit 576315b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/midea_ac_lan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def update_listener(hass: HomeAssistant, config_entry: ConfigEntry) -> Non
hass.async_create_task(
hass.config_entries.async_forward_entry_setups(config_entry, ALL_PLATFORM),
)
device_id = config_entry.data.get(CONF_DEVICE_ID)
device_id: int = cast(int, config_entry.data.get(CONF_DEVICE_ID))
customize = config_entry.options.get(CONF_CUSTOMIZE, "")
ip_address = config_entry.options.get(CONF_IP_ADDRESS, None)
refresh_interval = config_entry.options.get(CONF_REFRESH_INTERVAL, None)
Expand Down Expand Up @@ -93,10 +93,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> None: # noqa:

def service_set_attribute(service: Any) -> None: # noqa: ANN401
"""Set service attribute func."""
device_id = service.data["device_id"]
device_id: int = service.data["device_id"]
attr = service.data["attribute"]
value = service.data["value"]
dev = hass.data[DOMAIN][DEVICES].get(device_id)
dev: MideaDevice = hass.data[DOMAIN][DEVICES].get(device_id)
if dev:
if attr == "fan_speed" and value == "auto":
value = 102
Expand Down

0 comments on commit 576315b

Please sign in to comment.