Просмотр исходного кода

CBI outdoor: Fix scale of countdown.

Remove redundant ranges and readonly marking.
Mark add_ele as optional, as many devices only return this infrequently.
Jason Rumney 2 лет назад
Родитель
Сommit
b5976febfe
1 измененных файлов с 4 добавлено и 6 удалено
  1. 4 6
      custom_components/tuya_local/devices/cbi_astute_outdoor_smartswitch.yaml

+ 4 - 6
custom_components/tuya_local/devices/cbi_astute_outdoor_smartswitch.yaml

@@ -18,13 +18,13 @@ secondary_entities:
       - id: 7
       - id: 7
         type: integer
         type: integer
         name: value
         name: value
-        unit: sec
+        unit: min
         range:
         range:
           min: 0
           min: 0
           max: 86400
           max: 86400
         mapping:
         mapping:
-          - scale: 0
-            step: 1
+          - scale: 60
+            step: 60
   - entity: select
   - entity: select
     category: config
     category: config
     name: Initial state
     name: Initial state
@@ -51,7 +51,7 @@ secondary_entities:
         unit: Wh
         unit: Wh
         class: measurement
         class: measurement
         force: true
         force: true
-        readonly: true
+        optional: true
   - entity: sensor
   - entity: sensor
     category: diagnostic
     category: diagnostic
     class: current
     class: current
@@ -79,7 +79,6 @@ secondary_entities:
           max: 50000
           max: 50000
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-            step: 1
   - entity: sensor
   - entity: sensor
     category: diagnostic
     category: diagnostic
     class: voltage
     class: voltage
@@ -96,4 +95,3 @@ secondary_entities:
           max: 5000
           max: 5000
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-            step: 1