Bläddra i källkod

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 3 år sedan
förälder
incheckning
c3d78509bc
1 ändrade filer med 10 tillägg och 0 borttagningar
  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