Parcourir la source

Add enum mapping

Enum mapping is taken from Tuya device debug table
see Debug device > Standard status set
Ben Allen il y a 1 mois
Parent
commit
5d6e0b1b6c
1 fichiers modifiés avec 23 ajouts et 0 suppressions
  1. 23 0
      custom_components/tuya_local/devices/xtuos_2x_petfeeder.yaml

+ 23 - 0
custom_components/tuya_local/devices/xtuos_2x_petfeeder.yaml

@@ -111,6 +111,24 @@ entities:
       - id: 101
         type: string
         name: sensor
+        mapping:
+          - dps_val:  ac_power_on1
+            value:  ac_power_on1
+          - dps_val:  ac_power_off
+            value:  ac_power_off
+          - dps_val:  ac_power_on
+            value:  ac_power_on
+          - dps_val:  ac_power_on2
+            value:  ac_power_on2
+          - dps_val:  ac_power_on3
+            value:  ac_power_on3
+          - dps_val:  ac_power_off1
+            value:  ac_power_off1
+          - dps_val:  ac_power_off2
+            value:  ac_power_off2
+          - dps_val:  ac_power_off3
+            value:  ac_power_off3
+
   - entity: sensor
     name: Mode
     class: enum
@@ -119,6 +137,11 @@ entities:
       - id: 103
         type: string
         name: sensor
+        mapping:
+          - dps_val: eco_mode
+            value: eco_mode
+          - dps_val: real_time_mode
+            value: real_time_mode
   - entity: number
     translation_key: volume
     category: config