Просмотр исходного кода

Use same arg name as HA climate component in async_set_humidity.

Some ways of calling this use keyword args, so the arg name has to match.
Jason Rumney 4 лет назад
Родитель
Сommit
bb0c821ff0
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      custom_components/tuya_local/generic/climate.py

+ 2 - 2
custom_components/tuya_local/generic/climate.py

@@ -257,11 +257,11 @@ class TuyaLocalClimate(ClimateEntity):
         r = self._humidity_dps.range(self._device)
         return DEFAULT_MAX_HUMIDITY if r is None else r["max"]
 
-    async def async_set_humidity(self, target_humidity):
+    async def async_set_humidity(self, humidity: int):
         if self._humidity_dps is None:
             raise NotImplementedError()
 
-        await self._humidity_dps.async_set_value(self._device, target_humidity)
+        await self._humidity_dps.async_set_value(self._device, humidity)
 
     @property
     def current_humidity(self):