Просмотр исходного кода

Inkbird iBBQ-4T: make power a binary sensor, null is not a fault

- Make dp 1 (power) a binary_sensor rather than a switch.  As a switch it tells
  the Tuya app that the thermometer is off, but the state of the actual
  thermometer does not change. (may also be the case with iBBQ-4BW?)
- when fault is not reporting, assume no fault.

Issue #750, followup comments.
Jason Rumney 2 лет назад
Родитель
Сommit
e845d1b2ed
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      custom_components/tuya_local/devices/inkbird_bbq4t_thermometer.yaml

+ 7 - 2
custom_components/tuya_local/devices/inkbird_bbq4t_thermometer.yaml

@@ -70,11 +70,14 @@ secondary_entities:
       # - id: 19
       # - id: 19
       #   type: string
       #   type: string
       #   name: unit
       #   name: unit
-  - entity: switch
+  - entity: binary_sensor
+    name: Power
+    class: power
+    category: diagnostics
     dps:
     dps:
       - id: 1
       - id: 1
         type: boolean
         type: boolean
-        name: switch
+        name: sensor
   - entity: binary_sensor
   - entity: binary_sensor
     name: Fault
     name: Fault
     class: problem
     class: problem
@@ -87,6 +90,8 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: 0
           - dps_val: 0
             value: false
             value: false
+          - dps_val: null
+            value: false
           - value: true
           - value: true
   - entity: select
   - entity: select
     name: Temperature unit
     name: Temperature unit