From 95ef271dab36fcd7b204aec952e15796d895f7fc Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 11 Nov 2021 13:50:18 +1030 Subject: [PATCH] more tox fixes --- custom_components/localtuya/fan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/localtuya/fan.py b/custom_components/localtuya/fan.py index 6a1e219..51d9d5e 100644 --- a/custom_components/localtuya/fan.py +++ b/custom_components/localtuya/fan.py @@ -74,7 +74,7 @@ class LocaltuyaFan(LocalTuyaEntity, FanEntity): self._ordered_list = self._config.get(CONF_FAN_ORDERED_LIST).split(",") self._ordered_list_mode = None - if type(self._ordered_list) is list and len(self._ordered_list) > 1: + if isinstance(self._ordered_list, list) and len(self._ordered_list) > 1: self._use_ordered_list = True _LOGGER.debug( "Fan _use_ordered_list: %s > %s", @@ -105,7 +105,7 @@ class LocaltuyaFan(LocalTuyaEntity, FanEntity): """Return the current percentage.""" return self._percentage - async def async_turn_on(self, percentage: str = None, **kwargs) -> None: + async def async_turn_on(self, percentage: str = None, preset_mode: str = None, **kwargs: Any) -> None: """Turn on the entity.""" _LOGGER.debug("Fan async_turn_on") await self._device.set_dp(True, self._dp_id)