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

ESP Fort EC-SPSP: rename, changes from review

- rename to specific device
- identify product in products section
- sync entity naming with similar devices
- use translations where possible

PR #2390
Jason Rumney 1 год назад
Родитель
Сommit
73f875b4d5

+ 9 - 10
custom_components/tuya_local/devices/smartplug_usb_childlock.yaml → custom_components/tuya_local/devices/espfort_ecspsp_usbsmartplug.yaml

@@ -1,7 +1,7 @@
-name: Plug In WiFi Smart Socket with USB
+name: USB smartplug
 products:
   - id: ynz9qmnmnsciccyc
-    name: Plug In WiFi Smart Socket with USB
+    name: ESP Fort EC-SPSP
 primary_entity:
   entity: switch
   class: outlet
@@ -13,7 +13,6 @@ primary_entity:
       name: switch
 secondary_entities:
   - entity: switch
-    name: AC Outlet
     class: outlet
     dps:
       - id: 2
@@ -30,7 +29,8 @@ secondary_entities:
         name: inching
   - entity: number
     category: config
-    name: USB Countdown Timer
+    name: USB timer
+    translation_key: timer
     dps:
       - id: 9
         type: integer
@@ -44,7 +44,7 @@ secondary_entities:
             step: 60
   - entity: number
     category: config
-    name: AC Outlet Countdown Timer
+    translation_key: timer
     dps:
       - id: 10
         type: integer
@@ -69,9 +69,9 @@ secondary_entities:
           - dps_val: "on"
             value: "on"
           - dps_val: memory
-            value: Remember last state
+            value: memory
   - entity: select
-    name: Indicator light mode
+    name: Light mode
     icon: "mdi:television-ambient-light"
     category: config
     dps:
@@ -80,14 +80,13 @@ secondary_entities:
         name: option
         mapping:
           - dps_val: relay
-            value: Indicate switch on/off state
+            value: State
           - dps_val: pos
-            value: Indicate inverted switch state
+            value: Position
           - dps_val: none
             value: "Off"
   - entity: lock
     translation_key: child_lock
-    icon: "mdi:account-lock"
     category: config
     dps:
       - id: 41