Hi!
I am trying to add 2 (very similar) sensors to Home Assistant. One works, one doesn’t. And I don’t understand why…
The two sensors are:
- The one in the title: Sonoff Wireless Door/Window Sensor SNZB-04, which doesn’t work.
- Sonoff Motion Sensor SNZB-03, which does work.
Both sensors were added using the Smart Life Application and both of them work as expected with it (it shows the correct state of the sensor).
I have Tuya integration in HA and both of those devices are shown.
But in HA->Settings->Devices and Services->Devices
for (1) in Device Info it says: Door Sensor (unsupported) by Tuya
for (2) in Device Info it says: PIR motion sensor (IDkXwcvanigdiTj3) by Tuya
The diagnostics’ file conternt is the following:
for (1):
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2022.10.5",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.5",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Bucharest",
"os_name": "Linux",
"os_version": "5.15.74",
"supervisor": "2022.10.0",
"host_os": "Home Assistant OS 9.3",
"docker_version": "20.10.18",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"localtuya": {
"version": "4.1.1",
"requirements": []
},
"smartthinq_sensors": {
"version": "0.24.2",
"requirements": [
"pycountry>=20.7.3",
"xmltodict>=0.12.0",
"cchardet>=2.1.7"
]
},
"hacs": {
"version": "1.28.3",
"requirements": [
"aiogithubapi>=22.2.4"
]
},
"salusfy": {
"version": "0.0.1",
"requirements": []
}
},
"integration_manifest": {
"domain": "tuya",
"name": "Tuya",
"documentation": "https://www.home-assistant.io/integrations/tuya",
"requirements": [
"tuya-iot-py-sdk==0.6.6"
],
"dependencies": [
"ffmpeg"
],
"codeowners": [
"@Tuya",
"@zlinoliver",
"@frenck"
],
"config_flow": true,
"iot_class": "cloud_push",
"dhcp": [
{
"macaddress": "105A17*"
},
{
"macaddress": "10D561*"
},
{
"macaddress": "1869D8*"
},
{
"macaddress": "381F8D*"
},
{
"macaddress": "508A06*"
},
{
"macaddress": "68572D*"
},
{
"macaddress": "708976*"
},
{
"macaddress": "7CF666*"
},
{
"macaddress": "84E342*"
},
{
"macaddress": "D4A651*"
},
{
"macaddress": "D81F12*"
}
],
"loggers": [
"tuya_iot"
],
"is_built_in": true
},
"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "40",
"app_type": "smartlife",
"mqtt_connected": null,
"disabled_by": null,
"disabled_polling": false,
"name": "Door Sensor",
"model": "",
"category": "mcs",
"product_id": "7jIGJAymiH8OsFFb",
"product_name": "Door Sensor",
"online": true,
"sub": true,
"time_zone": "+03:00",
"active_time": "2022-10-30T13:38:26+00:00",
"create_time": "2022-10-30T13:38:26+00:00",
"update_time": "2022-10-30T13:38:26+00:00",
"function": {},
"status_range": {
"switch": {
"type": "Boolean",
"value": {}
},
"battery": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 500,
"scale": 0,
"step": 1
}
}
},
"status": {
"switch": true,
"battery": 100
},
"home_assistant": {
"name": "Door Sensor",
"name_by_user": null,
"disabled": false,
"disabled_by": null,
"entities": []
}
}
}
and for (2):
{
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2022.10.5",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.10.5",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Bucharest",
"os_name": "Linux",
"os_version": "5.15.74",
"supervisor": "2022.10.0",
"host_os": "Home Assistant OS 9.3",
"docker_version": "20.10.18",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"localtuya": {
"version": "4.1.1",
"requirements": []
},
"smartthinq_sensors": {
"version": "0.24.2",
"requirements": [
"pycountry>=20.7.3",
"xmltodict>=0.12.0",
"cchardet>=2.1.7"
]
},
"hacs": {
"version": "1.28.3",
"requirements": [
"aiogithubapi>=22.2.4"
]
},
"salusfy": {
"version": "0.0.1",
"requirements": []
}
},
"integration_manifest": {
"domain": "tuya",
"name": "Tuya",
"documentation": "https://www.home-assistant.io/integrations/tuya",
"requirements": [
"tuya-iot-py-sdk==0.6.6"
],
"dependencies": [
"ffmpeg"
],
"codeowners": [
"@Tuya",
"@zlinoliver",
"@frenck"
],
"config_flow": true,
"iot_class": "cloud_push",
"dhcp": [
{
"macaddress": "105A17*"
},
{
"macaddress": "10D561*"
},
{
"macaddress": "1869D8*"
},
{
"macaddress": "381F8D*"
},
{
"macaddress": "508A06*"
},
{
"macaddress": "68572D*"
},
{
"macaddress": "708976*"
},
{
"macaddress": "7CF666*"
},
{
"macaddress": "84E342*"
},
{
"macaddress": "D4A651*"
},
{
"macaddress": "D81F12*"
}
],
"loggers": [
"tuya_iot"
],
"is_built_in": true
},
"data": {
"endpoint": "https://openapi.tuyaeu.com",
"auth_type": 0,
"country_code": "40",
"app_type": "smartlife",
"mqtt_connected": null,
"disabled_by": null,
"disabled_polling": false,
"name": "PIR motion sensor",
"model": "",
"category": "pir",
"product_id": "IDkXwcvanigdiTj3",
"product_name": "PIR motion sensor",
"online": true,
"sub": true,
"time_zone": "+03:00",
"active_time": "2022-10-30T08:22:40+00:00",
"create_time": "2022-10-30T08:22:40+00:00",
"update_time": "2022-10-30T08:22:40+00:00",
"function": {},
"status_range": {
"pir": {
"type": "Enum",
"value": {
"range": [
"pir",
"none"
]
}
},
"battery": {
"type": "Integer",
"value": {
"unit": "",
"min": 0,
"max": 500,
"scale": 0,
"step": 1
}
}
},
"status": {
"pir": "none",
"battery": 100
},
"home_assistant": {
"name": "PIR motion 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": "motion",
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"entity_id": "binary_sensor.pir_motion_sensor",
"state": "off",
"attributes": {
"device_class": "motion",
"friendly_name": "PIR motion sensor"
},
"last_changed": "2022-10-30T16:12:21.153476+00:00",
"last_updated": "2022-10-30T16:12:21.153476+00:00"
}
}
]
}
}
}
So, I concluded that for the Door Sensor the properties are not exposed to HA. I think this should be an easy fix. I would like to add them manually, but I don’t know how and where…