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

feat (simple_blinds): some devices report current position

Adding optional current_position dp for those devices that report it.
Split out Reverse switch so it can be configured.

PR #4584
Jason Rumney 4 дней назад
Родитель
Сommit
3bcf400e6f
1 измененных файлов с 17 добавлено и 3 удалено
  1. 17 3
      custom_components/tuya_local/devices/simple_blinds.yaml

+ 17 - 3
custom_components/tuya_local/devices/simple_blinds.yaml

@@ -21,10 +21,24 @@ entities:
           max: 100
         mapping:
           - invert: true
-      - id: 5
-        name: control_back_mode
-        type: boolean
+      - id: 3
+        name: current_position
+        type: integer
+        optional: true
+        range:
+          min: 0
+          max: 100
+        mapping:
+          - invert: true
       - id: 7
         # seems intended to match action, but doesn't change in observation
         name: work_state
         type: string
+  - entity: switch
+    name: Reverse
+    category: config
+    icon: "mdi:arrow-u-down-left"
+    dps:
+      - id: 5
+        type: boolean
+        name: switch