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

feat (loonas_curtain): hide reverse switch if unavailable

- add compatible Dooya DC1545V blind motor
Not a curtain, but there are too many similar devices to create
variants for minor details that the user can deal with in the UI
config themselves.

Issue #4525
Jason Rumney 2 дней назад
Родитель
Сommit
2fff9f9492
1 измененных файлов с 14 добавлено и 1 удалено
  1. 14 1
      custom_components/tuya_local/devices/loonas_curtain.yaml

+ 14 - 1
custom_components/tuya_local/devices/loonas_curtain.yaml

@@ -16,6 +16,9 @@ products:
     manufacturer: Nordice
   - id: iznuapjmqurazh7m
     manufacturer: Emteco
+  - id: 4ha1598tkq4dh2yx
+    manufacturer: Dooya
+    model: DC1545V
 entities:
   - entity: cover
     class: curtain
@@ -49,10 +52,15 @@ entities:
           max: 100
         mapping:
           - invert: true
+      - id: 7
+        name: work_state
+        type: string
+        optional: true
   - entity: switch
     name: Reverse
     category: config
     icon: "mdi:arrow-u-down-left"
+    hidden: unavailable
     dps:
       - id: 5
         type: string
@@ -63,9 +71,14 @@ entities:
             value: true
           - dps_val: forward
             value: false
+      - id: 5
+        type: string
+        optional: true
+        name: available
+        mapping:
           - dps_val: null
             value: false
-            hidden: true
+          - value: true
   - entity: binary_sensor
     class: problem
     category: diagnostic