Răsfoiți Sursa

fix(locks): dp 47 motor_state seems to be inverted

Several device configs already had the inverted state, but some
didn't. Nothing in the history suggests that they are not also
inverted, as there seems to be a common design here, in most cases
the last change was the addition of this dp.

One device using dp 40 was not changed, as the common design does not
seem to apply there, though it may also be inverted.

Issue #5459
Jason Rumney 1 zi în urmă
părinte
comite
ba0f05b9ed

+ 5 - 0
custom_components/tuya_local/devices/ble_hu06_lock.yaml

@@ -40,6 +40,11 @@ entities:
       - id: 47
         name: lock_state
         type: boolean
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
       - id: 62
         name: unlock_app
         type: integer

+ 5 - 0
custom_components/tuya_local/devices/ble_positivo_smart_fechadura.yaml

@@ -27,6 +27,11 @@ entities:
       - id: 47
         type: boolean
         name: lock_state
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
       - id: 61
         type: base64
         name: code_unlock

+ 5 - 0
custom_components/tuya_local/devices/ble_ysgbs01_lock.yaml

@@ -48,6 +48,11 @@ entities:
         type: boolean
         name: lock_state
         optional: true
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
       - id: 55
         type: integer
         name: unlock_temp_pwd

+ 5 - 0
custom_components/tuya_local/devices/bstuokey_invisible_lock.yaml

@@ -45,6 +45,11 @@ entities:
       - id: 47
         type: boolean
         name: lock_state
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
       - id: 54
         type: string
         optional: true

+ 5 - 0
custom_components/tuya_local/devices/hornbill_y4_smart_lock.yaml

@@ -87,6 +87,11 @@ entities:
         type: boolean
         optional: true
         name: lock_state
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
       # [Report unlocking record] is used for the device to report the record
       # of online temporary password unlocking.
       - id: 55

+ 5 - 0
custom_components/tuya_local/devices/nice_digi_lock.yaml

@@ -27,6 +27,11 @@ entities:
         type: boolean
         name: lock_state
         optional: true
+        mapping:
+          - dps_val: true
+            value: false
+          - dps_val: false
+            value: true
       - id: 61
         type: base64
         name: code_unlock