mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Improve humidifier type hints in integrations (#90030)
Fix humidifier type hints in integrations
This commit is contained in:
parent
292feb4e24
commit
04872f72ea
@ -436,7 +436,7 @@ class GenericHygrostat(HumidifierEntity, RestoreEntity):
|
||||
data = {ATTR_ENTITY_ID: self._switch_entity_id}
|
||||
await self.hass.services.async_call(HA_DOMAIN, SERVICE_TURN_OFF, data)
|
||||
|
||||
async def async_set_mode(self, mode: str):
|
||||
async def async_set_mode(self, mode: str) -> None:
|
||||
"""Set new mode.
|
||||
|
||||
This method must be run in the event loop and returns a coroutine.
|
||||
|
@ -1,6 +1,7 @@
|
||||
"""Support for Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier with humidifier entity."""
|
||||
import logging
|
||||
import math
|
||||
from typing import Any
|
||||
|
||||
from miio.integrations.humidifier.deerma.airhumidifier_mjjsq import (
|
||||
OperationMode as AirhumidifierMjjsqOperationMode,
|
||||
@ -136,10 +137,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
|
||||
"""Get the current mode."""
|
||||
return self._mode
|
||||
|
||||
async def async_turn_on(
|
||||
self,
|
||||
**kwargs,
|
||||
) -> None:
|
||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||
"""Turn the device on."""
|
||||
result = await self._try_command(
|
||||
"Turning the miio device on failed.", self._device.on
|
||||
@ -148,7 +146,7 @@ class XiaomiGenericHumidifier(XiaomiCoordinatedMiioEntity, HumidifierEntity):
|
||||
self._state = True
|
||||
self.async_write_ha_state()
|
||||
|
||||
async def async_turn_off(self, **kwargs) -> None:
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Turn the device off."""
|
||||
result = await self._try_command(
|
||||
"Turning the miio device off failed.", self._device.off
|
||||
|
Loading…
x
Reference in New Issue
Block a user