Procházet zdrojové kódy

Catit Fountain: add range back to filter and pump sensors.

Invert needs to know the range in order to know where to invert to.
Without that, the counters count up rather than down, which is less useful.

Discussion #501
Jason Rumney před 2 roky
rodič
revize
df699d5ed8

+ 6 - 0
custom_components/tuya_local/devices/catit_pixi_smart_fountain.yaml

@@ -43,6 +43,9 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         precision: 0
         precision: 0
+        range:
+          min: 0
+          max: 43200
         mapping:
         mapping:
           - scale: 1440 # minutes => days
           - scale: 1440 # minutes => days
             invert: true
             invert: true
@@ -56,6 +59,9 @@ secondary_entities:
         type: integer
         type: integer
         name: sensor
         name: sensor
         precision: 0
         precision: 0
+        range:
+          min: 0
+          max: 86400
         mapping:
         mapping:
           - scale: 1440
           - scale: 1440
             invert: true
             invert: true