Bläddra i källkod

Update ZC34T-03-3A_swing_arm_opener.yaml

Still not correct , I am finding this device a bit awkward
Levanterman 2 år sedan
förälder
incheckning
5eecbbf11f

+ 28 - 21
custom_components/tuya_local/devices/ZC34T-03-3A_swing_arm_opener.yaml

@@ -8,17 +8,6 @@ primary_entity:
   class: window
   class: window
   name: Control
   name: Control
   dps:
   dps:
-    # - id: 1
-    #   type: sensor
-    #   name: status
-    #   optional: true
-    #   mapping:
-    #     - dps_val: open
-    #       value: open
-    #       #icon: "mdi:window-open-variant"
-    #     - dps_val: closed
-    #       value: closed
-    #       #icon: "mdi:window-closed-variant"  
     - id: 101
     - id: 101
       type: string
       type: string
       name: control
       name: control
@@ -29,6 +18,17 @@ primary_entity:
           value: close
           value: close
         - dps_val: stop
         - dps_val: stop
           value: stop
           value: stop
+    # - id: 107
+    #   name: sensor
+    #   type: boolean
+    #   # class: enum
+    #   # mapping:
+    #   #   - dps_val: "on"
+    #   #     value: open
+    #   #     icon: "mdi:window-open-variant"
+    #   #   - dps_val: "off"
+    #   #     value: closed
+    #   #     icon: "mdi:window-closed-variant"  
 secondary_entities:
 secondary_entities:
   - entity: switch
   - entity: switch
     name: Lock
     name: Lock
@@ -47,7 +47,7 @@ secondary_entities:
             value: unlock
             value: unlock
             icon: "mdi:lock-open-variant"
             icon: "mdi:lock-open-variant"
   - entity: sensor
   - entity: sensor
-    name: Status
+    name: Window Current Status
     class: enum
     class: enum
     dps:
     dps:
       - id: 1
       - id: 1
@@ -64,7 +64,7 @@ secondary_entities:
             icon: "mdi:window-closed-variant"  
             icon: "mdi:window-closed-variant"  
                      
                      
   - entity: sensor
   - entity: sensor
-    name: Wind and Rain Feedback
+    name: Wind and Rain Sensor
     class: enum
     class: enum
     dps:
     dps:
       - id: 104
       - id: 104
@@ -74,8 +74,10 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: rain
           - dps_val: rain
             value: rain
             value: rain
+            icon: "mdi:weather-pouring"
             default: true
             default: true
           - dps_val: fine
           - dps_val: fine
+            icon: "mdi:weather-sunny"
             value: fine            
             value: fine            
   - entity: sensor
   - entity: sensor
     name: Fault
     name: Fault
@@ -97,26 +99,28 @@ secondary_entities:
         optional: true
         optional: true
         mapping:
         mapping:
           - dps_val: open
           - dps_val: open
-            value: open
+            value: "on"
           - dps_val: close
           - dps_val: close
-            value: close
-
-  - entity: switch
-    name: Window switch message Push Messages
+            value: "off"
+  - entity: sensor
+    name: Window Status
     class: enum
     class: enum
     dps:
     dps:
       - id: 107
       - id: 107
         type: string
         type: string
-        name: switch
+        name: sensor
         mapping:
         mapping:
           - dps_val: "on"
           - dps_val: "on"
-            value: on
+            value: true
+            icon: "mdi:window-open-variant"
             default: true
             default: true
           - dps_val: "off"
           - dps_val: "off"
-            value: off
+            value: false
+            icon: "mdi:window-closed-variant"  
   - entity: switch
   - entity: switch
     name: Wind and rain sensor detection switch
     name: Wind and rain sensor detection switch
     class: enum
     class: enum
+    icon: "mdi:weather-sunny-alert"
     dps:
     dps:
       - id: 108
       - id: 108
         type: string
         type: string
@@ -124,6 +128,9 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: "on"
           - dps_val: "on"
             value: on
             value: on
+            icon: "mdi:weather-sunny-alert"
             default: true
             default: true
           - dps_val: "off"
           - dps_val: "off"
             value: off
             value: off
+            icon: "mdi:weather-sunny-off"
+