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

Holman WX1: make feature present sensors into attributes.

These are not interesting enough to be fully fledged sensors in their own right.
Move them into a related sensor as a "sensor_present" extra attribute.
Fix the type. (Issue #1108)
Jason Rumney 2 лет назад
Родитель
Сommit
dbba17af8e
1 измененных файлов с 7 добавлено и 15 удалено
  1. 7 15
      custom_components/tuya_local/devices/holman_wx1_taptimer.yaml

+ 7 - 15
custom_components/tuya_local/devices/holman_wx1_taptimer.yaml

@@ -27,6 +27,9 @@ secondary_entities:
         name: sensor
         type: integer
         unit: C
+      - id: 115
+        name: sensor_present
+        type: boolean 
   - entity: sensor
     name: Soil moisture
     class: humidity
@@ -247,21 +250,6 @@ secondary_entities:
             value: 12H
           - dps_val: 24
             value: 24H
-  - entity: binary_sensor
-    name: Soil sensor present
-    category: diagnostic
-    dps:
-      - id: 115
-        name: sensor
-        type: boolean 
-  - entity: binary_sensor
-    name: Rain sensor present
-    category: diagnostic
-    dps:
-      - id: 116
-        optional: true
-        name: sensor
-        type: string
   - entity: binary_sensor
     name: Soil sensor power OK
     category: diagnostic
@@ -440,6 +428,10 @@ secondary_entities:
       - id: 125
         name: sensor
         type: boolean
+      - id: 116
+        optional: true
+        name: sensor_present
+        type: boolean
   - entity: sensor
     name: Next watering encoded # shows the next scheduled watering time based on starts A, B and C
     category: diagnostic