home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.96k stars 30.17k forks source link

Tuya Smart IR Controller #116023

Closed bruceborrett closed 2 months ago

bruceborrett commented 5 months ago

The problem

I have this Tuya "Smart IR Controller" device:

image

This device and the devices linked to it do show up in Home Assistant, but they show as "unsupported" and do not have any entities.

I am using the new official Tuya integration (forked from the Tuya Smartlife repo) which does not require Tuya API access. I have many other Tuya devices all working fine.

The integration diagnostics data does contain all the information about the devices with all their relevant entities, so it seems the integration just needs to be updated to be able to recognise what type of devices these are.

The original Smartlife repo contained some instructions on how to add new devices here - https://github.com/tuya/tuya-smart-life/tree/main#categorystandard-instruction-set-expansion-development

Perhaps someone with more experience with developing home assistant integrations can assist with carrying out those instructions.

Here is the relevant data from the diagnostics:

{ "id": "bf782d7e0cc21076b9rauj", "name": "Smart IR", "category": "wnykq", "product_id": "ejv37o6yz9vtxcuo", "product_name": "Smart IR", "online": true, "sub": false, "time_zone": "+02:00", "active_time": "2024-04-05T16:08:51+00:00", "create_time": "2024-04-05T16:08:51+00:00", "update_time": "2024-04-05T16:08:51+00:00", "function": {}, "status_range": {}, "status": {}, "home_assistant": {}, "set_up": false, "support_local": true }, { "id": "bfc235371979e2df94yl1j", "name": "Air", "category": "infrared_ac", "product_id": "000000dp6u", "product_name": "Air Conditioner", "online": true, "sub": true, "time_zone": "+02:00", "active_time": "2024-04-05T16:14:35+00:00", "create_time": "2024-04-05T16:14:35+00:00", "update_time": "2024-04-05T16:14:35+00:00", "function": { "F": { "type": "ENUM", "value": { "min": 0, "max": 3, "scale": 0, "step": 1, "type": "Integer" } }, "M": { "type": "ENUM", "value": { "min": 0, "max": 4, "scale": 0, "step": 1, "type": "Integer" } }, "PowerOff": { "type": "STRING", "value": "PowerOff" }, "PowerOn": { "type": "STRING", "value": "PowerOn" }, "T": { "type": "ENUM", "value": { "min": 16, "max": 30, "scale": 0, "step": 1, "type": "Integer" } } }, "status_range": { "wind": { "type": "ENUM", "value": { "min": 0, "max": 3, "scale": 0, "step": 1, "type": "Integer" } }, "mode": { "type": "ENUM", "value": { "min": 0, "max": 4, "scale": 0, "step": 1, "type": "Integer" } }, "power": { "type": "BOOLEAN", "value": {} }, "temp": { "type": "ENUM", "value": { "min": 16, "max": 30, "scale": 0, "step": 1, "type": "Integer" } } }, "status": { "power": true, "mode": 0, "temp": 21, "wind": 0 }, "home_assistant": {}, "set_up": false, "support_local": false }, { "id": "bf4324be01687e71d80pbw", "name": "TV Samsung", "category": "infrared_tv", "product_id": "000000dp6t", "product_name": "TV", "online": true, "sub": true, "time_zone": "+02:00", "active_time": "2024-04-05T16:26:44+00:00", "create_time": "2024-04-05T16:26:44+00:00", "update_time": "2024-04-05T16:26:44+00:00", "function": { "-/--": { "type": "STRING", "value": "-/--" }, "0": { "type": "STRING", "value": 0 }, "1": { "type": "STRING", "value": 1 }, "2": { "type": "STRING", "value": 2 }, "3": { "type": "STRING", "value": 3 }, "4": { "type": "STRING", "value": 4 }, "5": { "type": "STRING", "value": 5 }, "6": { "type": "STRING", "value": 6 }, "7": { "type": "STRING", "value": 7 }, "8": { "type": "STRING", "value": 8 }, "9": { "type": "STRING", "value": 9 }, "Back": { "type": "STRING", "value": "Back" }, "C": { "type": "ENUM", "value": { "min": 1, "max": 999, "scale": 0, "step": 1, "type": "Integer" } }, "Channel+": { "type": "STRING", "value": "Channel+" }, "Channel-": { "type": "STRING", "value": "Channel-" }, "Down": { "type": "STRING", "value": "Down" }, "Home": { "type": "STRING", "value": "Home" }, "Left": { "type": "STRING", "value": "Left" }, "Menu": { "type": "STRING", "value": "Menu" }, "OK": { "type": "STRING", "value": "OK" }, "Power": { "type": "STRING", "value": "Power" }, "Right": { "type": "STRING", "value": "Right" }, "Up": { "type": "STRING", "value": "Up" }, "Volume+": { "type": "STRING", "value": "Volume+" }, "Volume-": { "type": "STRING", "value": "Volume-" } }, "status_range": {}, "status": {}, "home_assistant": {}, "set_up": false, "support_local": false }

Related to https://github.com/home-assistant/core/issues/66866

What version of Home Assistant Core has the issue?

2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tuya/

Diagnostics information

config_entry-tuya-81c3dbf545c87509c53186349e1860f4.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 5 months ago

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.

(message by CodeOwnersMention)


tuya documentation tuya source (message by IssueLinks)

bruceborrett commented 5 months ago

If I duplicate the standard aircon definition in climate.py like this:

CLIMATE_DESCRIPTIONS["infrared_ac"] = CLIMATE_DESCRIPTIONS["kt"]

Then the device shows up in Home Assistant as shown below:

image

However it always shows as unavailable, any clues from anyone as to why this might be?

patrick-kiwi commented 5 months ago

It would be great if someone could fix this issue. I'm frustratingly close to controlling my heat pump from home assistant via the Tuya universal remote.

issue-triage-workflows[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.