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
72.15k stars 30.19k forks source link

Tuya thermostat device doesn't show all modes in HA #121329

Open detece opened 3 months ago

detece commented 3 months ago

The problem

The device on home assistant doesn't show all modes showed on Smart home application, and the power off (Eteint) doesn't work Smart life application image image

What version of Home Assistant Core has the issue?

core-2024.7.1

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

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

Diagnostics information

tuya-8269878209a444ce7decea8b2b0c1b0d-Chambre parentale-7eafe9da7ccad6991730a2e2c9061b6d(2).json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

The model is recognized as ETOP-E34-HT-FP(343B-03) in Tuya IoT Platform

home-assistant[bot] commented 3 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)

bjeanes commented 3 months ago

For me, it doesn't show any modes.

Screenshot 2024-07-06 at 10 51 57 AM

It also won't change from "Off" state, even when turned on in TuyaSmart app:

image

As per @detece, I have the same sets of modes

bjeanes commented 3 months ago

This is a new device so haven't integrated it in the past. Because I also use LocalTuya for some other Tuya devices, I started poking around there. Logging into my Tuya IoT account I can see it was using "Standard Instructions" which really didn't expose very much at all:

Screenshot 2024-07-06 at 11 08 28 AM

These general instructions line up with the only entities that the Tuya integration is creating for me:

image

In the Tuya IoT portal, I can change the device instruction to "DP Instruction":

Screenshot 2024-07-06 at 11 08 55 AM

This then revealed a lot more options in the device debugger:

Screenshot 2024-07-06 at 11 12 36 AM

Unfortunately, I still wasn't able to get this added even via LocalTuya. It wouldn't detect DPs automatically. If I listed them explicitly (Power,TempSet,TempCurrent,Mode,child_lock,light,Fault,countdown_set) it would take me to the configuration screen, but it listed the values for each DP as -1 and trying to proceed after configuration just gave an unhelpful "unknown error".

The DP specification is as follows:

{
  "result": {
    "category": "qn",
    "functions": [
      {
        "code": "Power",
        "desc": "{}",
        "name": "开关",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "TempSet",
        "desc": "{\"unit\":\"℃\",\"min\":5,\"max\":50,\"scale\":0,\"step\":1}",
        "name": "目标温度",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":5,\"max\":50,\"scale\":0,\"step\":1}"
      },
      {
        "code": "Mode",
        "desc": "{\"range\":[\"low\",\"high\",\"af\"]}",
        "name": "模式",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"high\",\"af\"]}"
      },
      {
        "code": "child_lock",
        "desc": "{}",
        "name": "童锁",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "light",
        "desc": "{}",
        "name": "灯光",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "countdown_set",
        "desc": "{\"range\":[\"cancel\",\"1h\",\"2h\",\"3h\",\"4h\",\"5h\",\"6h\",\"7h\",\"8h\",\"9h\",\"10h\",\"11h\",\"12h\",\"13h\",\"14h\",\"15h\",\"16h\",\"17h\",\"18h\",\"19h\",\"20h\",\"21h\",\"22h\",\"23h\",\"24h\"]}",
        "name": "倒计时",
        "type": "Enum",
        "values": "{\"range\":[\"cancel\",\"1h\",\"2h\",\"3h\",\"4h\",\"5h\",\"6h\",\"7h\",\"8h\",\"9h\",\"10h\",\"11h\",\"12h\",\"13h\",\"14h\",\"15h\",\"16h\",\"17h\",\"18h\",\"19h\",\"20h\",\"21h\",\"22h\",\"23h\",\"24h\"]}"
      }
    ],
    "status": [
      {
        "code": "Power",
        "name": "开关",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "TempSet",
        "name": "目标温度",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":5,\"max\":50,\"scale\":0,\"step\":1}"
      },
      {
        "code": "TempCurrent",
        "name": "当前温度",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":0,\"max\":50,\"scale\":0,\"step\":1}"
      },
      {
        "code": "Mode",
        "name": "模式",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"high\",\"af\"]}"
      },
      {
        "code": "child_lock",
        "name": "童锁",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "light",
        "name": "灯光",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "Fault",
        "name": "故障告警",
        "type": "Bitmap",
        "values": "{\"label\":[\"1\",\"2\",\"3\"],\"maxlen\":3}"
      },
      {
        "code": "countdown_set",
        "name": "倒计时",
        "type": "Enum",
        "values": "{\"range\":[\"cancel\",\"1h\",\"2h\",\"3h\",\"4h\",\"5h\",\"6h\",\"7h\",\"8h\",\"9h\",\"10h\",\"11h\",\"12h\",\"13h\",\"14h\",\"15h\",\"16h\",\"17h\",\"18h\",\"19h\",\"20h\",\"21h\",\"22h\",\"23h\",\"24h\"]}"
      }
    ]
  },
  "success": true,
  "t": 1720250387972,
  "tid": "207288e73b6811ef8fee42c5932cd286"
}

This doesn't show the corresponding DP IDs, but the properties API call does:

{
  "result": {
    "properties": [
      {
        "code": "Power",
        "custom_name": "",
        "dp_id": 1,
        "time": 1720247190269,
        "type": "bool",
        "value": true
      },
      {
        "code": "TempSet",
        "custom_name": "",
        "dp_id": 2,
        "time": 1720247182787,
        "type": "value",
        "value": 21
      },
      {
        "code": "TempCurrent",
        "custom_name": "",
        "dp_id": 3,
        "time": 1720250005001,
        "type": "value",
        "value": 21
      },
      {
        "code": "Mode",
        "custom_name": "",
        "dp_id": 4,
        "time": 1720247193448,
        "type": "enum",
        "value": "high"
      },
      {
        "code": "child_lock",
        "custom_name": "",
        "dp_id": 7,
        "time": 1720246858228,
        "type": "bool",
        "value": false
      },
      {
        "code": "light",
        "custom_name": "",
        "dp_id": 10,
        "time": 1720246858240,
        "type": "bool",
        "value": true
      },
      {
        "code": "Fault",
        "custom_name": "",
        "dp_id": 12,
        "time": 1720246858265,
        "type": "bitmap",
        "value": 0
      },
      {
        "code": "countdown_set",
        "custom_name": "",
        "dp_id": 19,
        "time": 1720246858261,
        "type": "enum",
        "value": "cancel"
      }
    ]
  },
  "success": true,
  "t": 1720250912242,
  "tid": "58f696d53b6911ef8fee42c5932cd286"
}
issue-triage-workflows[bot] commented 1 day 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.