Przeglądaj źródła

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 3 lat temu
rodzic
commit
546c0b0130

+ 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