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

Add status select entity to energy meter configuration

Dead96 5 месяцев назад
Родитель
Сommit
1097dde9de
1 измененных файлов с 19 добавлено и 0 удалено
  1. 19 0
      custom_components/tuya_local/devices/tongou_sa1_wifi_energy_meter.yaml

+ 19 - 0
custom_components/tuya_local/devices/tongou_sa1_wifi_energy_meter.yaml

@@ -4,6 +4,19 @@ products:
     manufacturer: Tongou
     manufacturer: Tongou
     model: TOSA1-0150XJWT2A
     model: TOSA1-0150XJWT2A
 entities:
 entities:
+  - entity: select
+    category: config
+    name: Status
+    icon: "mdi:wifi"
+    dps:
+      - id: 109
+        type: string
+        name: option
+        mapping:
+          - dps_val: online
+            value: Online
+          - dps_val: offline
+            value: Offline
   - entity: sensor
   - entity: sensor
     class: voltage
     class: voltage
     category: diagnostic
     category: diagnostic
@@ -12,6 +25,8 @@ entities:
         type: base64
         type: base64
         name: sensor
         name: sensor
         optional: true
         optional: true
+        class: measurement
+        force: true
         persist: false
         persist: false
         unit: V
         unit: V
         mask: "FFFF000000000000"
         mask: "FFFF000000000000"
@@ -25,6 +40,8 @@ entities:
         type: base64
         type: base64
         name: sensor
         name: sensor
         optional: true
         optional: true
+        class: measurement
+        force: true
         persist: false
         persist: false
         unit: A
         unit: A
         mask: "0000FFFFFF000000"
         mask: "0000FFFFFF000000"
@@ -39,6 +56,8 @@ entities:
         name: sensor
         name: sensor
         optional: true
         optional: true
         persist: false
         persist: false
+        class: measurement
+        force: true
         unit: kW
         unit: kW
         mask: "0000000000FFFFFF"
         mask: "0000000000FFFFFF"
         mapping:
         mapping: