tuya / tuya-home-assistant

Home Assistant integration for controlling Powered by Tuya (PBT) devices using Tuya Open API, maintained by the Home Assistant Community and Tuya Developer Team.
MIT License
857 stars 206 forks source link

New Driver Request: UME Smart WiFi LED Security Light Motion Sensor #269

Open bmorgan99 opened 2 years ago

bmorgan99 commented 2 years ago

UME (ALLDY?) Smart WiFi LED Security Light Motion Sensor

I took a stab at this myself, but was in over my head. If you have more detailed instructions than here I can try again.

**Device info

{
    "result": [
    {
        "active_time": 1624903996,
        "biz_type": 0,
        "category": "gyd",
        "create_time": 1624903996,
        "icon": "smart/device_icon/az1624815120496a16AW/eb6a63c74f9c441cbeimk1162492059133471.png",
        "id": "eb6a63c74f9c441cbeimk1",
        "ip": "162.x.x.x",
        "lat": "33.x",
        "local_key": "1a7ed2790917179f",
        "lon": "-86.x",
        "name": " Outdoor 1",
        "online": true,
        "owner_id": "44395305",
        "product_id": "3gmaa4dkxpmqk6rv",
        "product_name": " ALLDY",
        "status": [{
                "code": "switch_led",
                "value": false
            },
            {
                "code": "work_mode",
                "value": "white"
            },
            {
                "code": "bright_value",
                "value": 1000
            },
            {
                "code": "temp_value",
                "value": 1000
            },
            {
                "code": "countdown",
                "value": 0
            },
            {
                "code": "device_mode",
                "value": "manual"
            },
            {
                "code": "pir_state",
                "value": "none"
            },
            {
                "code": "cds",
                "value": "10lux"
            },
            {
                "code": "pir_sensitivity",
                "value": "high"
            },
            {
                "code": "pir_delay",
                "value": 297
            },
            {
                "code": "switch_pir",
                "value": true
            },
            {
                "code": "standby_time",
                "value": 1
            },
            {
                "code": "standby_bright",
                "value": 0
            }
        ],
        "sub": false,
        "time_zone": "-05:00",
        "uid": "az1624815120496a16AW",
        "update_time": 1626057514,
        "uuid": "12ab4dfb668d55a8"
    }
    ],
    "success": true,
    "t": 1626115169785
}

**Device specifications

{
  "result": {
    "category": "gyd",
    "functions": [
      {
        "code": "switch_led",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "work_mode",
        "type": "Enum",
        "values": "{\"range\":[\"white\",\"colour\"]}"
      },
      {
        "code": "bright_value",
        "type": "Integer",
        "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "temp_value",
        "type": "Integer",
        "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "countdown",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
      },
      {
        "code": "control_data",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "device_mode",
        "type": "Enum",
        "values": "{\"range\":[\"auto\",\"manual\"]}"
      },
      {
        "code": "cds",
        "type": "Enum",
        "values": "{\"range\":[\"2000lux\",\"300lux\",\"50lux\",\"10lux\",\"5lux\",\"now\"]}"
      },
      {
        "code": "pir_sensitivity",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      },
      {
        "code": "pir_delay",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":5,\"max\":3600,\"scale\":0,\"step\":1}"
      },
      {
        "code": "switch_pir",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "standby_time",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":1,\"max\":480,\"scale\":0,\"step\":1}"
      },
      {
        "code": "standby_bright",
        "type": "Integer",
        "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}"
      }
    ],
    "status": [
      {
        "code": "switch_led",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "work_mode",
        "type": "Enum",
        "values": "{\"range\":[\"white\",\"colour\"]}"
      },
      {
        "code": "bright_value",
        "type": "Integer",
        "values": "{\"min\":10,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "temp_value",
        "type": "Integer",
        "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "countdown",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}"
      },
      {
        "code": "device_mode",
        "type": "Enum",
        "values": "{\"range\":[\"auto\",\"manual\"]}"
      },
      {
        "code": "pir_state",
        "type": "Enum",
        "values": "{\"range\":[\"pir\",\"none\"]}"
      },
      {
        "code": "cds",
        "type": "Enum",
        "values": "{\"range\":[\"2000lux\",\"300lux\",\"50lux\",\"10lux\",\"5lux\",\"now\"]}"
      },
      {
        "code": "pir_sensitivity",
        "type": "Enum",
        "values": "{\"range\":[\"low\",\"middle\",\"high\"]}"
      },
      {
        "code": "pir_delay",
        "type": "Integer",
        "values": "{\"unit\":\"s\",\"min\":5,\"max\":3600,\"scale\":0,\"step\":1}"
      },
      {
        "code": "switch_pir",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "standby_time",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":1,\"max\":480,\"scale\":0,\"step\":1}"
      },
      {
        "code": "standby_bright",
        "type": "Integer",
        "values": "{\"min\":0,\"max\":1000,\"scale\":0,\"step\":1}"
      }
    ]
  },
  "success": true,
  "t": 1627571823115
}
bmorgan99 commented 2 years ago

Works now

bmorgan99 commented 2 years ago

Oops, only the light works. There is no support for its motion sensor in Home Assistant.