tuya/tuya-home-assistant
在 GitHub 查看TuyaZigbee Human Presence Detector Recognised but wrong category 'kg', should be 'hps'
Open
#943 建立於 2023年8月14日
enhancementhelp wanted
倉庫指標
- Star
- (960 star)
- PR 合併指標
- (PR 指標待抓取)
描述
Tuya WiFi /Zigbee Human Presence Detector Smart Human Body PIR Sensor Radar Detector Microwave Motion Sensors.
https://www.aliexpress.com/item/1005004836104902.html
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2023.8.2",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.11.4",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Madrid",
"os_name": "Linux",
"os_version": "6.1.39",
"supervisor": "2023.08.1",
"host_os": "Home Assistant OS 10.4",
"docker_version": "23.0.6",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"tapo": {
"version": "2.5.0",
"requirements": [
"plugp100==3.6.0"
]
},
"hacs": {
"version": "1.30.1",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"aarlo": {
"version": "0.7.4b19",
"requirements": [
"unidecode",
"cloudscraper>=1.2.71",
"paho-mqtt"
]
}
},
"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-iot-py-sdk==0.6.6"
],
"is_built_in": true
},
"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "34",
"app_type": "smartlife",
"mqtt_connected": true,
"disabled_by": null,
"disabled_polling": false,
"name": "Human presence sensor",
"model": "",
"category": "kg",
"product_id": "sxm7l9xa",
"product_name": "Human presence sensor",
"online": true,
"sub": true,
"time_zone": "+02:00",
"active_time": "2023-08-13T13:15:10+00:00",
"create_time": "2023-08-13T13:15:10+00:00",
"update_time": "2023-08-13T19:27:03+00:00",
"function": {
"switch_1": {
"type": "Boolean",
"value": {}
},
"switch_2": {
"type": "Boolean",
"value": {}
},
"countdown_1": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 43200,
"scale": 0,
"step": 1
}
},
"countdown_2": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 43200,
"scale": 0,
"step": 1
}
},
"work_mode": {
"type": "Enum",
"value": {
"range": [
"colour",
"charging",
"music",
"scene"
]
}
},
"bright_value": {
"type": "Integer",
"value": {
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
},
"temp_value": {
"type": "Integer",
"value": {
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"sensitivity": {
"type": "Integer",
"value": {
"unit": "\u6863",
"min": 1,
"max": 10,
"scale": 0,
"step": 1
}
},
"far_detection": {
"type": "Integer",
"value": {
"unit": "M",
"min": 0,
"max": 950,
"scale": 2,
"step": 10
}
},
"near_detection": {
"type": "Integer",
"value": {
"unit": "M",
"min": 0,
"max": 950,
"scale": 2,
"step": 10
}
},
"fading_time": {
"type": "Integer",
"value": {
"unit": "\u79d2",
"min": 50,
"max": 15000,
"scale": 1,
"step": 50
}
},
"detection_delay": {
"type": "Integer",
"value": {
"unit": "\u79d2",
"min": 0,
"max": 100,
"scale": 1,
"step": 1
}
}
},
"status_range": {
"switch_1": {
"type": "Boolean",
"value": {}
},
"switch_2": {
"type": "Boolean",
"value": {}
},
"countdown_1": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 43200,
"scale": 0,
"step": 1
}
},
"countdown_2": {
"type": "Integer",
"value": {
"unit": "s",
"min": 0,
"max": 43200,
"scale": 0,
"step": 1
}
},
"work_mode": {
"type": "Enum",
"value": {
"range": [
"colour",
"charging",
"music",
"scene"
]
}
},
"bright_value": {
"type": "Integer",
"value": {
"min": 10,
"max": 1000,
"scale": 0,
"step": 1
}
},
"temp_value": {
"type": "Integer",
"value": {
"min": 0,
"max": 1000,
"scale": 0,
"step": 1
}
},
"illuminance_value": {
"type": "Integer",
"value": {
"unit": "lux",
"min": 0,
"max": 10000,
"scale": 0,
"step": 1
}
},
"presence_state": {
"type": "Enum",
"value": {
"range": [
"none",
"presence"
]
}
},
"sensitivity": {
"type": "Integer",
"value": {
"unit": "\u6863",
"min": 1,
"max": 10,
"scale": 0,
"step": 1
}
},
"far_detection": {
"type": "Integer",
"value": {
"unit": "M",
"min": 0,
"max": 950,
"scale": 2,
"step": 10
}
},
"near_detection": {
"type": "Integer",
"value": {
"unit": "M",
"min": 0,
"max": 950,
"scale": 2,
"step": 10
}
},
"target_dis_closest": {
"type": "Integer",
"value": {
"unit": "M",
"min": 0,
"max": 1000,
"scale": 2,
"step": 1
}
},
"fading_time": {
"type": "Integer",
"value": {
"unit": "\u79d2",
"min": 50,
"max": 15000,
"scale": 1,
"step": 50
}
},
"detection_delay": {
"type": "Integer",
"value": {
"unit": "\u79d2",
"min": 0,
"max": 100,
"scale": 1,
"step": 1
}
}
},
"status": {
"switch_1": false,
"switch_2": false,
"countdown_1": 0,
"countdown_2": 0,
"work_mode": "colour",
"bright_value": 10,
"temp_value": 0,
"illuminance_value": 3,
"presence_state": "none",
"sensitivity": 9,
"far_detection": 950,
"near_detection": 60,
"target_dis_closest": 0,
"fading_time": 50,
"detection_delay": 1
},
"home_assistant": {
"name": "Human presence sensor",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": [
{
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": "outlet",
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "switch.human_presence_sensor_switch_1",
"state": "off",
"attributes": {
"device_class": "outlet",
"friendly_name": "Human presence sensor Switch 1"
},
"last_changed": "2023-08-13T20:50:22.290526+00:00",
"last_updated": "2023-08-13T20:50:22.290526+00:00"
}
},
{
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": "outlet",
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "switch.human_presence_sensor_switch_2",
"state": "off",
"attributes": {
"device_class": "outlet",
"friendly_name": "Human presence sensor Switch 2"
},
"last_changed": "2023-08-13T20:50:22.291359+00:00",
"last_updated": "2023-08-13T20:50:22.291359+00:00"
}
}
]
}
}
}
The device has the wrong category 'kg', when it should be 'hps', which is already supported. The Tuya IoT platform reports it as 'kg', I wonder if there's any way to tell home assistant that the category is 'hps'? Otherwise as 'kg' it only shows two switches which don't serve any purpose.