Smoke Detector 3 in 1 Smoke, Temperature, Humidity not bringing in all the values

I have purchased 4x new smoke alarms Tuya Wifi Smoke Alarm Temperature And Humidity Detection 3 In1 Fire Protection Smoke Detector Sensor Smart Life Firefighter - Smoke Detector - AliExpress and hoping to get some control in Home Assistant. All required functionality works in the Smart Home/Tuya app however when I import the device in Home assistant it only shows that it is a smoke detector.

When I view the devices in google home it comes through correctly.

Ideally I would like the ability to turn off the alarms and view the temperature and humidity within home assistant.

Can somebody please steer me in the right direction.

Thanks!

1 Like

Hi.
I have probably the same device and the same problem and I would enjoy help as well.

Device normal info

  • Brand: unknown
  • Model: WIFI Smoke detector with temp and humidity sensor

Device info

{
      "active_time": 1690391461,
      "biz_type": 18,
      "category": "ywbj",
      "create_time": 1690391461,
      "icon": "smart/icon/ay15427647462366edzT/13e5f1cb7df593e6b812947b9566d939.png",
      "id": "bf7ac46e4576493b73586z",
      "ip": "***",
      "lat": "***",
      "local_key": "***",
      "lon": "***",
      "model": "",
      "name": "Smoke sensor",
      "online": true,
      "owner_id": "153986064",
      "product_id": "fzb5up2iehjcrnqy",
      "product_name": "WIFI TH&Smoke sensor",
      "status": [
        {
          "code": "smoke_sensor_state",
          "value": "normal"
        },
        {
          "code": "battery_percentage",
          "value": 100
        },
        {
          "code": "muffling",
          "value": false
        },
        {
          "code": "temp_current",
          "value": 247
        },
        {
          "code": "humidity_value",
          "value": 63
        },
        {
          "code": "self_test",
          "value": true
        },
        {
          "code": "temp_alarm",
          "value": "cancel"
        }
      ],
      "sub": false,
      "time_zone": "+02:00",
      "uid": "***",
      "update_time": 1690752245,
      "uuid": "7326d42ff642b61f"
    }

Device specifications

2023-07-31 00:16:20.515 DEBUG (SyncWorker_0) [tuya_iot] Response: {
  "result": {
    "category": "ywbj",
    "functions": [
      {
        "code": "muffling",
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "smoke_sensor_state",
        "type": "Enum",
        "values": "{\"range\":[\"alarm\",\"normal\"]}"
      },
      {
        "code": "battery_percentage",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "muffling",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "temp_current",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":-100,\"max\":1000,\"scale\":1,\"step\":1}"
      },
      {
        "code": "humidity_value",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":1,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "self_test",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "temp_alarm",
        "type": "Enum",
        "values": "{\"range\":[\"loweralarm\",\"upperalarm\",\"cancel\"]}"
      }
    ]
  },
  "success": true,
  "t": 1690755360426,
  "tid": "aa1794bb2f2611eea260e28454ac584b"
}

I have tried to edit sensors.py myself, but I’m probably doing something incorrectly as the entities are not added in Home Assistant

--- sensor.py_orig
+++ sensor.py
@@ -737,0 +738,12 @@
+        TuyaSensorEntityDescription(
+            key=DPCode.TEMP_CURRENT,
+            translation_key="temperature",
+            device_class=SensorDeviceClass.TEMPERATURE,
+            state_class=SensorStateClass.MEASUREMENT,
+        ),
+        TuyaSensorEntityDescription(
+            key=DPCode.HUMIDITY_VALUE,
+            translation_key="humidity",
+            device_class=SensorDeviceClass.HUMIDITY,
+            state_class=SensorStateClass.MEASUREMENT,
+        ),

Also, I would like to mention, I got here, when I have opened Feature request topic here: Tuya Smoke sensor with temperature and humidity So if you still have the problem, please vote for it.

1 Like