소스 검색

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 년 전
부모
커밋
c3d78509bc
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  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