Quellcode durchsuchen

PIR sensor alarm: changes from review

PR #3249
Jason Rumney vor 1 Jahr
Ursprung
Commit
fce0b9e989
1 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 3 5
      custom_components/tuya_local/devices/pir_sensor_alarm.yaml

+ 3 - 5
custom_components/tuya_local/devices/pir_sensor_alarm.yaml

@@ -12,8 +12,7 @@ entities:
         mapping:
         mapping:
           - dps_val: pir
           - dps_val: pir
             value: true
             value: true
-          - dps_val: "none"
-            value: false
+          - value: false
   - entity: switch
   - entity: switch
     name: Armed
     name: Armed
     icon: "mdi:shield-home"
     icon: "mdi:shield-home"
@@ -22,15 +21,13 @@ entities:
         type: boolean
         type: boolean
         name: switch
         name: switch
   - entity: binary_sensor
   - entity: binary_sensor
-    translation_key: charge_energy
-    class: plug
+    class: battery_charging
     category: diagnostic
     category: diagnostic
     dps:
     dps:
       - id: 103
       - id: 103
         type: boolean
         type: boolean
         name: sensor
         name: sensor
   - entity: sensor
   - entity: sensor
-    translation_key: battery_level
     class: battery
     class: battery
     category: diagnostic
     category: diagnostic
     dps:
     dps:
@@ -40,6 +37,7 @@ entities:
         unit: "%"
         unit: "%"
   - entity: number
   - entity: number
     name: Alarm time
     name: Alarm time
+    class: duration
     category: config
     category: config
     icon: "mdi:alarm"
     icon: "mdi:alarm"
     dps:
     dps: