Quellcode durchsuchen

Zemismart: roller shade: add opened and closed to action

Based on other configs, the action only indicated opening or closing and
continues to indicate those even when the cover has fully opened or closed.
Use position to detect when it is fully opened or closed and report that.

#672
Jason Rumney vor 3 Jahren
Ursprung
Commit
546c0b0130
1 geänderte Dateien mit 13 neuen und 0 gelöschten Zeilen
  1. 13 0
      custom_components/tuya_local/devices/zemismart_roller_shade.yaml

+ 13 - 0
custom_components/tuya_local/devices/zemismart_roller_shade.yaml

@@ -35,6 +35,19 @@ primary_entity:
     - id: 7
     - id: 7
       name: unreliable_action
       name: unreliable_action
       type: string
       type: string
+      mapping:
+        - dps_val: opening
+          constraint: current_position
+          conditions:
+            - dps_val: 0
+              value: opened
+            - value: opening
+        - dps_val: closing
+          constraint: current_position
+          conditions:
+            - dps_val: 100
+              value: closed
+            - value: closing
     - id: 12
     - id: 12
       name: fault_code
       name: fault_code
       type: bitfield
       type: bitfield