make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.07k stars 432 forks source link

Request support for Ledvance SMART+ Wifi Ceiling Fan #1800

Open pbambr opened 3 months ago

pbambr commented 3 months ago

Request for support of the Ledvance SMART+ Wifi Ceiling Fan https://www.ledvance.com/professional/products/smart-home/smart-luminaires/smart-indoor-luminaires/smart-wifi-ceiling-fans-for-various-appliaction-areas--combining-light-and-air-ventilation-c200719

The fan integrates with the current tuyalocal by using cct_lightbulb and hereby loses the fan entity. The light and timer for the light seem to work probably.

Log Message

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.4.0",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.2",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Copenhagen",
    "os_name": "Linux",
    "os_version": "6.1.73-haos-raspi",
    "supervisor": "2024.03.1",
    "host_os": "Home Assistant OS 12.1",
    "docker_version": "24.0.7",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "tuya_local": {
      "version": "2024.3.2",
      "requirements": [
        "tinytuya==1.13.2"
      ]
    },
    "hacs": {
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "localtuya": {
      "version": "5.2.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "tuya_local",
    "name": "Tuya Local",
    "codeowners": [
      "@make-all"
    ],
    "config_flow": true,
    "dependencies": [],
    "documentation": "https://github.com/make-all/tuya-local",
    "integration_type": "device",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/make-all/tuya-local/issues",
    "requirements": [
      "tinytuya==1.13.2"
    ],
    "version": "2024.3.2",
    "is_built_in": false
  },
  "data": {
    "name": "PeterLys",
    "type": "cct_lightbulb",
    "device_id": "**REDACTED**",
    "device_cid": "",
    "local_key": "**REDACTED**",
    "host": "**REDACTED**",
    "protocol_version": 3.3,
    "tinytuya_version": "1.13.2",
    "api_version_set": 3.3,
    "api_version_used": 3.3,
    "api_working": true,
    "status": {},
    "cached_state": {
      "updated_at": 1712342193.054916,
      "20": false,
      "21": "control",
      "22": 21,
      "23": 333,
      "25": "00000",
      "26": 0,
      "51": false,
      "53": 1,
      "55": 0
    },
    "pending_state": {},
    "connected": true,
    "force_dps": [],
    "home_assistant": {
      "name": "PeterLys",
      "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,
          "unit_of_measurement": null,
          "state": {
            "entity_id": "light.peterlys",
            "state": "off",
            "attributes": {
              "min_color_temp_kelvin": 2700,
              "max_color_temp_kelvin": 6500,
              "min_mireds": 153,
              "max_mireds": 370,
              "supported_color_modes": [
                "color_temp"
              ],
              "color_mode": null,
              "brightness": null,
              "color_temp_kelvin": null,
              "color_temp": null,
              "hs_color": null,
              "rgb_color": null,
              "xy_color": null,
              "work_mode": "control",
              "scene": "00000",
              "friendly_name": "PeterLys",
              "supported_features": 0
            },
            "last_changed": "2024-04-04T22:07:59.103815+00:00",
            "last_reported": "2024-04-04T22:07:59.103815+00:00",
            "last_updated": "2024-04-04T22:07:59.103815+00:00"
          }
        },
        {
          "disabled": false,
          "disabled_by": null,
          "entity_category": "config",
          "device_class": null,
          "original_device_class": null,
          "icon": null,
          "unit_of_measurement": "min",
          "state": {
            "entity_id": "number.peterlys_timer",
            "state": "0.0",
            "attributes": {
              "min": 0.0,
              "max": 1440.0,
              "step": 1.0,
              "mode": "auto",
              "unit_of_measurement": "min",
              "friendly_name": "PeterLys Timer"
            },
            "last_changed": "2024-04-04T22:07:59.099978+00:00",
            "last_reported": "2024-04-04T22:07:59.110537+00:00",
            "last_updated": "2024-04-04T22:07:59.099978+00:00"
          }
        }
      ]
    }
  }
}

Information about DPS mappings

Please paste the output here.

Control of the fan should be manageable from yaml

not sure what id 55 does - probably timer for the fan:

Product ID

--The product ID of the fan is; h2xswd4oyce7bikh

Information about how the device functions

file:///C:/Users/pbamb/Downloads/asset-13045792__smart_wifi_ceiling_fan.pdf

aruesberg commented 2 months ago

I've managed to create a device profile. @pbambr Please unzip the archive and copy the attached file to custom_components/tuya_local/devices

Disclaimer: I have only done basic tests for now. Please report any problems Ledvance_CeilingWifiFanLamp.zip

@make-all Sorry for just attaching the file. I'm familiar with git but I have yet to set it up on my private machine.