Parcourir la source

Add `persist: false` to optional sensor dps with null mappings.

Where we have defined mappings for null, the values shouldn't be
persisted, instead the null mapping should show through.
Jason Rumney il y a 2 ans
Parent
commit
c14826e625

+ 2 - 0
custom_components/tuya_local/devices/arlec_thermostat_smartplug.yaml

@@ -288,6 +288,8 @@ secondary_entities:
       - id: 50
         type: bitfield
         name: sensor
+        optional: true
+        persist: false
         mapping:
           - dps_val: 0
             value: false

+ 1 - 0
custom_components/tuya_local/devices/avatto_roller_blinds.yaml

@@ -26,6 +26,7 @@ primary_entity:
       type: integer
       unit: "%"
       optional: true
+      persist: false
     - id: 5
       name: control_back_mode
       type: boolean

+ 1 - 0
custom_components/tuya_local/devices/bcom_intercom_camera.yaml

@@ -12,6 +12,7 @@ primary_entity:
     - id: 136
       name: snapshot
       type: base64
+      persist: false
       optional: true
       mapping:
         - dps_val: ""

+ 1 - 0
custom_components/tuya_local/devices/em3378_weather_station.yaml

@@ -186,6 +186,7 @@ secondary_entities:
         type: boolean
         name: sensor
         optional: true
+        persist: false
         mapping:
           - dps_val: null
             value: false

+ 1 - 0
custom_components/tuya_local/devices/hdmi_sync_light.yaml

@@ -6,6 +6,7 @@ primary_entity:
       type: boolean
       name: switch
       optional: true
+      persist: false
       mapping:
         - dps_val: null
           value: false

+ 1 - 0
custom_components/tuya_local/devices/loonas_curtain.yaml

@@ -58,6 +58,7 @@ secondary_entities:
         type: boolean
         name: sensor
         optional: true
+        persist: false
         mapping:
           - dps_val: 0
             value: false

+ 2 - 0
custom_components/tuya_local/devices/m027_curtain.yaml

@@ -28,6 +28,8 @@ primary_entity:
     - id: 7
       name: action
       type: string
+      optional: true
+      persist: false
       mapping:
         - dps_val: opening
           constraint: current_position

+ 2 - 0
custom_components/tuya_local/devices/moebot_s_mower.yaml

@@ -81,6 +81,8 @@ secondary_entities:
       - id: 102
         type: bitfield
         name: sensor
+        optional: true
+        persist: false
         mapping:
           - dps_val: 0
             value: false

+ 2 - 0
custom_components/tuya_local/devices/pj1103_clamp_meter.yaml

@@ -78,6 +78,7 @@ secondary_entities:
           max: 100
         mapping:
           - dps_val: null
+            invalid: true
           - scale: 10
   - entity: sensor
     name: Energy
@@ -104,6 +105,7 @@ secondary_entities:
         type: bitfield
         name: sensor
         optional: true
+        persist: false
         mapping:
           - dps_val: null
             value: false

+ 1 - 0
custom_components/tuya_local/devices/smartplugv2_energy.yaml

@@ -109,6 +109,7 @@ secondary_entities:
         type: bitfield
         name: sensor
         optional: true
+        persist: false
         mapping:
           - dps_val: 0
             value: false

+ 1 - 0
custom_components/tuya_local/devices/whm04_doorbell.yaml

@@ -140,6 +140,7 @@ secondary_entities:
         type: integer
         name: sensor
         optional: true
+        persist: false
         mapping:
           - dps_val: null
             value: false

+ 1 - 0
custom_components/tuya_local/devices/zemismart_curtain.yaml

@@ -56,6 +56,7 @@ secondary_entities:
         type: boolean
         name: sensor
         optional: true
+        persist: false
         mapping:
           - dps_val: 0
             value: false