Forráskód Böngészése

Surge protector 2x2: update naming

Use human readable names for entity names, update top level name to not assume an identical device (but assume two groups of switches are outlet + USB seems reasonable as an assumption given common Tuya dp allocation convention)
Jason Rumney 2 éve
szülő
commit
b467915873

+ 12 - 10
custom_components/tuya_local/devices/smart_surge_protector_plug_2x2.yaml

@@ -1,35 +1,37 @@
-name: Smart Surge Protector Plug 2x2
+name: Two outlet two USB smartplug
 products:
   - id: cianx1tz1ifyvyqm
-    name: Smart Surge Protector Plug 2x2
+    name: Surge protector plug 2x2
 primary_entity:
   entity: switch
-  name: switch_1
+  class: outlet
+  name: Outlet 1
   dps:
     - id: 1
       name: switch
       type: boolean
 secondary_entities:
   - entity: switch
-    name: switch_2
+    class: outlet
+    name: Outlet 2
     dps:
       - id: 2
         name: switch
         type: boolean
   - entity: switch
-    name: switch_usb1
+    name: USB 1
     dps:
       - id: 7
         name: switch
         type: boolean
   - entity: switch
-    name: switch_usb2
+    name: USB 2
     dps:
       - id: 8
         name: switch
         type: boolean
   - entity: number
-    name: countdown_1
+    name: Timer 1
     icon: "mdi:timer"
     category: config
     dps:
@@ -44,7 +46,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: number
-    name: countdown_2
+    name: Timer 2
     icon: "mdi:timer"
     category: config
     dps:
@@ -59,7 +61,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: number
-    name: countdown_usb1
+    name: Timer USB 1
     icon: "mdi:timer"
     category: config
     dps:
@@ -74,7 +76,7 @@ secondary_entities:
           - scale: 60
             step: 60
   - entity: number
-    name: countdown_usb2
+    name: Timer USB 2
     icon: "mdi:timer"
     category: config
     dps: