Procházet zdrojové kódy

EzaIoT R9Lite: naming and syntax tweaks

- use only alphanumeric and underscore in attribute names
- standardize on double quotes where needed on strings
- remove some unneeded quoting

PR #2651
Jason Rumney před 1 rokem
rodič
revize
6e6b87761b

+ 8 - 11
custom_components/tuya_local/devices/ezaiot_r9lite_thermostat.yaml

@@ -12,7 +12,7 @@ primary_entity:
       name: hvac_mode
       mapping:
         - dps_val: false
-          value: 'off'
+          value: "off"
         - dps_val: true
           constraint: mode
           conditions:
@@ -63,16 +63,13 @@ primary_entity:
     - id: 101
       type: integer
       name: unknown_101
-      hidden: true
     - id: 36
       # dps id 36 (valve state) is redundant with dps id 110
       type: string
-      name: Valve state (text representation open/close)
-      hidden: true
+      name: valve_state
     - id: 112
       type: integer
       name: unknown_112
-      hidden: true
     - id: 102
       type: integer
       name: temperature_adjust_step
@@ -81,9 +78,9 @@ primary_entity:
       name: hvac_action
       mapping:
         - dps_val: false
-          value: 'idle'
+          value: idle
         - dps_val: true
-          value: 'heating'
+          value: heating
     - id: 105
       type: string
       name: device_name
@@ -120,17 +117,17 @@ secondary_entities:
   - entity: select
     name: Schedule
     category: config
-    icon: 'mdi:calendar-clock'
+    icon: "mdi:calendar-clock"
     dps:
       - id: 31
         type: string
         name: option
         mapping:
-          - dps_val: '5_2'
+          - dps_val: "5_2"
             value: Weekday+Weekend
-          - dps_val: '6_1'
+          - dps_val: "6_1"
             value: Mon-Sat+Sun
-          - dps_val: '7'
+          - dps_val: "7"
             value: Daily
   - entity: lock
     translation_key: child_lock