Explorar o código

Arlec panel heater v2: make preset_mode optional

Preset mode seems to be not reported when the device is off.
Make it optional so device can be detected.

Discussion #1544
Jason Rumney %!s(int64=2) %!d(string=hai) anos
pai
achega
9d23683253

+ 3 - 0
custom_components/tuya_local/devices/arlec_panel_heater_v2.yaml

@@ -27,6 +27,7 @@ primary_entity:
     - id: 4
       name: preset_mode
       type: string
+      optional: true
       mapping:
         - dps_val: ECO
           value: eco
@@ -34,6 +35,8 @@ primary_entity:
           value: comfort
         - dps_val: Antifrost
           value: away
+        - dps_val: null
+          value: unknown
 secondary_entities:
   - entity: lock
     name: Child lock