So the light entity works just fine. I can turn on the light, set the temperature and dim it.
The Fan entity shows up but the switch on/off shows up as “unavailable”
The Speed settings is ok as well as the mode selection
What is funny is that both the speed setting and mode selection are working if and only if I turn on the fan beforehands using the remote or the tuya app on my phone.
So long story short, this disabled switch will prevent me to actually fully control the fan.
Is there anything I am doing wrong?
same here, light is working but fan is unavailable. I tried with local tuya as well but can’t seem to control fan speeds correctly (fan on/off and light on/off works)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 608, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 927, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1384, in add_to_platform_finish
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1023, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1087, in __async_calculate_state
if state_attributes := self.state_attributes:
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 402, in state_attributes
data[ATTR_PERCENTAGE] = self.percentage
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tuya/fan.py", line 257, in percentage
return ordered_list_item_to_percentage(self._speeds.range, value)
File "/usr/src/homeassistant/homeassistant/util/percentage.py", line 29, in ordered_list_item_to_percentage
raise ValueError(f'The item "{item}" is not in "{ordered_list}"')
ValueError: The item "1" is not in "['1', '2', '3', '4', '5', '6']"