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
69.72k stars 28.87k forks source link

[Tuya] DS03 Ceiling Fan Dimmer Not Recognizing Light #115726

Open jnrcorp opened 2 months ago

jnrcorp commented 2 months ago

The problem

I have 4 Treatlife DS03 ceiling fan light dimmer switches. One of them works properly in HA, while the other 3 do not. The one that works is much older than the others. The 3 that do not work only show the fan on/off toggle. It is missing fan speed, light on/off, and light brightness control.

For reference: Working DS03: Main Module: 3.1.4 MCU Module: 3.3.14

No Light Dimmer or Fan Speed in HA: Main Module: 2.1.6 MCU Module: 3.3.19

No Light Dimmer or Fan Speed in HA: Main Module; 2.1.6 MCU Module: 3.3.22

Looking at the diagnostics I see the configuration of the 3 newer ceiling fan dimmers are very different from the older one. It looks like the newer ones are misconfigured as "fskg" instead of "fsd" (based on code, but "fs" based on prior config). I am unsure how to replay the initial load API call. I am happy to provide any additional information to help diagnose this. I have also reached out to Treatlife, but they seem to not understand what I'm asking about.

What version of Home Assistant Core has the issue?

core-2024.4.3

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

tuya

Link to integration documentation on our website

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

Diagnostics information

Diagnostics from the offending DS03 Ceiling Fan Dimmer Switch (after this will be the an example of an older device that works)

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "6.6.25-haos",
    "supervisor": "2024.04.0",
    "host_os": "Home Assistant OS 12.2",
    "docker_version": "25.0.5",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "adaptive_lighting": {
      "version": "1.21.1",
      "requirements": [
        "ulid-transform"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-device-sharing-sdk==0.1.9"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://apigw.tuyaus.com",
    "terminal_id": "1712358616177OfbdaD",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "id": "eb973b259e8e50a9e0jssn",
    "name": "Fireplace",
    "category": "fskg",
    "product_id": "ea88zei7auxu48s6",
    "product_name": "Fan Dimmer Switch",
    "online": true,
    "sub": false,
    "time_zone": "-04:00",
    "active_time": "2024-04-15T20:58:16+00:00",
    "create_time": "2024-04-15T20:58:16+00:00",
    "update_time": "2024-04-15T20:58:16+00:00",
    "function": {
      "switch_fan": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      },
      "countdown_fan": {
        "type": "Integer",
        "value": {
          "unit": "\u5206\u949f",
          "min": 0,
          "max": 1440,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status_range": {
      "switch_fan": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      },
      "countdown_fan": {
        "type": "Integer",
        "value": {
          "unit": "\u5206\u949f",
          "min": 0,
          "max": 1440,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "switch_fan": false,
      "bright_value": 1000,
      "countdown_fan": 0
    },
    "home_assistant": {
      "name": "Fireplace",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": [
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "fan.fireplace",
            "state": "off",
            "attributes": {
              "friendly_name": "Fireplace",
              "supported_features": 0
            },
            "last_changed": "2024-04-15T23:41:22.943464+00:00",
            "last_reported": "2024-04-15T23:41:22.943464+00:00",
            "last_updated": "2024-04-15T23:41:22.943464+00:00"
          }
        }
      ]
    },
    "set_up": true,
    "support_local": true
  }
}

Fully functioning ceiling fan dimmer switch (DS03):

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "6.6.25-haos",
    "supervisor": "2024.04.0",
    "host_os": "Home Assistant OS 12.2",
    "docker_version": "25.0.5",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "adaptive_lighting": {
      "version": "1.21.1",
      "requirements": [
        "ulid-transform"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "integration_manifest": {
    "domain": "tuya",
    "name": "Tuya",
    "codeowners": [
      "@Tuya",
      "@zlinoliver",
      "@frenck"
    ],
    "config_flow": true,
    "dependencies": [
      "ffmpeg"
    ],
    "dhcp": [
      {
        "macaddress": "105A17*"
      },
      {
        "macaddress": "10D561*"
      },
      {
        "macaddress": "1869D8*"
      },
      {
        "macaddress": "381F8D*"
      },
      {
        "macaddress": "508A06*"
      },
      {
        "macaddress": "68572D*"
      },
      {
        "macaddress": "708976*"
      },
      {
        "macaddress": "7CF666*"
      },
      {
        "macaddress": "84E342*"
      },
      {
        "macaddress": "D4A651*"
      },
      {
        "macaddress": "D81F12*"
      }
    ],
    "documentation": "https://www.home-assistant.io/integrations/tuya",
    "integration_type": "hub",
    "iot_class": "cloud_push",
    "loggers": [
      "tuya_iot"
    ],
    "requirements": [
      "tuya-device-sharing-sdk==0.1.9"
    ],
    "is_built_in": true
  },
  "data": {
    "endpoint": "https://apigw.tuyaus.com",
    "terminal_id": "1712358616177OfbdaD",
    "mqtt_connected": true,
    "disabled_by": null,
    "disabled_polling": false,
    "id": "87031225e09806b32193",
    "name": "Master Ceiling Fan",
    "category": "fs",
    "product_id": "ipyqwvhvzzjezv35",
    "product_name": "Ceiling Fan Dimmer Switch",
    "online": true,
    "sub": false,
    "time_zone": "-05:00",
    "active_time": "2024-04-05T21:44:41+00:00",
    "create_time": "2024-04-05T21:44:41+00:00",
    "update_time": "2024-04-05T21:44:41+00:00",
    "function": {
      "switch": {
        "type": "Boolean",
        "value": {}
      },
      "fan_speed": {
        "type": "Enum",
        "value": {
          "range": [
            "1",
            "2",
            "3",
            "4"
          ]
        }
      },
      "light": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status_range": {
      "switch": {
        "type": "Boolean",
        "value": {}
      },
      "fan_speed": {
        "type": "Enum",
        "value": {
          "range": [
            "1",
            "2",
            "3",
            "4"
          ]
        }
      },
      "light": {
        "type": "Boolean",
        "value": {}
      },
      "bright_value": {
        "type": "Integer",
        "value": {
          "min": 10,
          "max": 1000,
          "scale": 0,
          "step": 1
        }
      }
    },
    "status": {
      "switch": false,
      "fan_speed": 2,
      "light": false,
      "bright_value": 1000
    },
    "home_assistant": {
      "name": "Master Ceiling Fan",
      "name_by_user": null,
      "disabled": false,
      "disabled_by": null,
      "entities": [
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "light.master_ceiling_fan",
            "state": "off",
            "attributes": {
              "supported_color_modes": [
                "brightness"
              ],
              "color_mode": null,
              "brightness": null,
              "friendly_name": "Ceiling Fan Light",
              "supported_features": 0
            },
            "last_changed": "2024-04-17T00:39:24.601749+00:00",
            "last_reported": "2024-04-17T00:39:24.601749+00:00",
            "last_updated": "2024-04-17T00:39:24.601749+00:00"
          }
        },
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": null,
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "original_icon": null,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "fan.master_ceiling_fan",
            "state": "off",
            "attributes": {
              "preset_modes": [],
              "percentage": 50,
              "percentage_step": 25.0,
              "preset_mode": null,
              "friendly_name": "Ceiling Fan",
              "supported_features": 1
            },
            "last_changed": "2024-04-16T11:31:28.172237+00:00",
            "last_reported": "2024-04-16T11:31:28.172237+00:00",
            "last_updated": "2024-04-16T11:31:28.172237+00:00"
          }
        }
      ]
    },
    "set_up": true,
    "support_local": true
  }
}

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 2 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)

jnrcorp commented 2 weeks ago

@frenck Please let me know if there's anything else I can provide to help resolve this. Thank you!

koolman27 commented 5 days ago
Tuya debugging page

@frenck I am also having this issue. I have‎ TREATLIFE(ASIN: B08P5D3ZKW) Fan controller. Main Module: V1.1.71 MCU: V1.0.7. ON/OFF works fine. fan speed is represented by 0-100% slider in HA and the status does not change when manipulated. In the Google Home and Tuya app, it is represented by four enums and works well.