You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Tuya ceiling fan with a light. I can control both the fan speed, timer and direction in the Tuya app and with Alexa. However, when I added it to HA, I can control the light, but the fan is listed as unavailable with the message "This entity is no longer being provided by the Tuya integration." The entity is entity fan.ceiling_fan_with_light.
I have attached the log for the error and the diagnostic
Logger: homeassistant.components.fan
Source: helpers/entity_platform.py:580
integration: Fan (documentation, issues)
First occurred: 16:00:15 (1 occurrences)
Last logged: 16:00:15
Error adding entity fan.ceiling_fan_with_light for domain fan with platform tuya
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 580, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 892, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1359, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
if state_attributes := self.state_attributes:
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/fan/__init__.py", line 420, in state_attributes
data[ATTR_PERCENTAGE] = self.percentage
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/tuya/fan.py", line 254, in percentage
return ordered_list_item_to_percentage(self._speeds.range, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/percentage.py", line 33, in ordered_list_item_to_percentage
raise ValueError(f'The item "{item}" is not in "{ordered_list}"')
ValueError: The item "3" is not in "['1', '2', '3', '4', '5', '6']"
Additional information
No response
The text was updated successfully, but these errors were encountered:
Hey there @tuya, @zlinoliver, @frenck, mind taking a look at this issue as it has been labeled with an integration (tuya) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of tuya can trigger bot actions by commenting:
@home-assistant close Closes the issue.
@home-assistant rename Awesome new title Renames the issue.
@home-assistant reopen Reopen the issue.
@home-assistant unassign tuya Removes the current integration label and assignees on the issue, add the integration domain after the command.
@home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
@home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
I have almost the exact same issue. A Tuya ceiling fan with a light. It used to work fine, but now I get the same error as you for the light entity. Fan control works as usual.
Maybe worth to mention is that I also see the same issue with LocalTuya. Remote control and Tuya app control works fine, so there is not a broken ceiling fan.
`--- fan.py
+++ fan.py.orig
@@ -250,7 +250,7 @@
if self._speeds is not None:
if (value := self.device.status.get(self._speeds.dpcode)) is None:
return None
The problem
I have a Tuya ceiling fan with a light. I can control both the fan speed, timer and direction in the Tuya app and with Alexa. However, when I added it to HA, I can control the light, but the fan is listed as unavailable with the message "This entity is no longer being provided by the Tuya integration." The entity is entity fan.ceiling_fan_with_light.
I have attached the log for the error and the diagnostic
fan.ceiling_fan_with_light log.txt
tuya-befa4c451b1ff6e4eb2455af72e6c599-Ceiling Fan With Light-4f572d2bc74121abdfe7a26be516a4e5.json
What version of Home Assistant Core has the issue?
core-2024.5.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Tuya
Link to integration documentation on our website
No response
Diagnostics information
tuya-befa4c451b1ff6e4eb2455af72e6c599-Ceiling Fan With Light-4f572d2bc74121abdfe7a26be516a4e5.json
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: