Przeglądaj źródła

Korex kettle: add default range for temperature

When the device is initialising, it might not have any dps yet, so the
conditional ranges are not taking effect. This leads to an exception
during initialisation of the entity, causing it not to appear.

Issue raised in comment on #3301
Jason Rumney 11 miesięcy temu
rodzic
commit
75342c56fe

+ 3 - 3
custom_components/tuya_local/devices/korex_axwf306n_smart_kettle.yaml

@@ -27,13 +27,13 @@ entities:
         type: string
         type: string
         name: temperature
         name: temperature
         unit: F
         unit: F
+        range:
+          min: 113
+          max: 212
         mapping:
         mapping:
           - constraint: keep_warm
           - constraint: keep_warm
             conditions:
             conditions:
               - dps_val: false
               - dps_val: false
-                range:
-                  min: 113
-                  max: 212
                 mapping:
                 mapping:
                   - dps_val: "0"
                   - dps_val: "0"
                     value: 113  # actually off, but avoids disjointed values
                     value: 113  # actually off, but avoids disjointed values