Explorar o código

fix(frankever_bv05_watervalve): improve based on new information

- add product id
- mark some dps as optional, which are not reported when adding the device when it is off.

Issue #4776
Jason Rumney hai 2 meses
pai
achega
7d0ef9f7ac

+ 14 - 4
custom_components/tuya_local/devices/frankever_bv05_watervalve.yaml

@@ -1,8 +1,8 @@
 name: Water valve
-# products:
-#   - id: UNKNOWN
-#     manufacturer: FrankEver
-#     model: FK-BV05
+products:
+  - id: kcdiut0eqeni7b8n
+    manufacturer: FrankEver
+    model: FK-BV05
 entities:
   - entity: switch
     icon: "mdi:pipe-valve"
@@ -15,21 +15,29 @@ entities:
     dps:
       - id: 2
         type: integer
+        optional: true
         name: valve
         range:
           min: 0
           max: 100
         mapping:
           - step: 10
+      - id: 1
+        type: boolean
+        name: available
   - entity: sensor
     name: Valve
     icon: "mdi:pipe-valve"
     dps:
       - id: 3
         type: integer
+        optional: true
         name: sensor
         unit: "%"
         class: measurement
+      - id: 1
+        type: integer
+        name: available
   - entity: binary_sensor
     class: problem
     category: diagnostic
@@ -55,6 +63,7 @@ entities:
     dps:
       - id: 5
         type: integer
+        optional: true
         name: sensor
         unit: L
         class: measurement
@@ -93,6 +102,7 @@ entities:
     dps:
       - id: 11
         type: integer
+        optional: true
         name: second
         range:
           min: 0