Parcourir la source

Invert the meaning of reversed.

It seems Tuya and Home Assistant have opposing views on what is normal
and what is reversed.  To make the behaviour consistent we need to
convert to Home Assistant's view, otherwise the reversed switch just
toggles between two different opposing views of the state Home Assistant
sees and the behaviour that Tuya has.
Jason Rumney il y a 3 ans
Parent
commit
c3d78509bc
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      custom_components/tuya_local/devices/wistar_roller_blind.yaml

+ 10 - 0
custom_components/tuya_local/devices/wistar_roller_blind.yaml

@@ -32,6 +32,11 @@ primary_entity:
     - id: 103
       type: boolean
       name: reversed
+      mapping:
+        - dps_val: true
+          value: false
+        - dps_val: false
+          value: true
     - id: 105
       type: boolean
       name: curtain_hand
@@ -147,3 +152,8 @@ secondary_entities:
       - id: 103
         type: boolean
         name: switch
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true