Explorar el Código

CT20W motion detector: minor improvements

- make the top level name generic in case of other devices matching
- remove the product id that looks more like a device id.
- leave the number entry type to the end user, and defer to the HA default for the default.
Jason Rumney hace 2 años
padre
commit
49e1a275b7

+ 4 - 8
custom_components/tuya_local/devices/CT20W_pir_motion_detector.yaml

@@ -1,9 +1,7 @@
-name: CT20W PIR Motion Detector
+name: Motion detector
 products:
 products:
-  - id: 205546373333989b6bf8
-    name: CT20W PIR Motion Detector
   - id: ejptirvg36uwwdwu
   - id: ejptirvg36uwwdwu
-    name: "CT20W"
+    name: CT20W PIR Motion Detector
 primary_entity:
 primary_entity:
   entity: alarm_control_panel
   entity: alarm_control_panel
   dps:
   dps:
@@ -26,9 +24,9 @@ secondary_entities:
         name: sensor
         name: sensor
         mapping:
         mapping:
           - dps_val: none
           - dps_val: none
-            value: False
+            value: false
           - dps_val: pir
           - dps_val: pir
-            value: True
+            value: true
   - entity: sensor
   - entity: sensor
     class: battery
     class: battery
     unit: "%"
     unit: "%"
@@ -46,7 +44,6 @@ secondary_entities:
     name: Alarm duration
     name: Alarm duration
     category: config
     category: config
     icon: "mdi:timer"
     icon: "mdi:timer"
-    mode: box
     dps:
     dps:
       - id: 106
       - id: 106
         type: integer
         type: integer
@@ -72,4 +69,3 @@ secondary_entities:
             value: "Sound and light"
             value: "Sound and light"
           - dps_val: "Mute_mode"
           - dps_val: "Mute_mode"
             value: "Mute"
             value: "Mute"
-