فهرست منبع

Update ZC34T-03-3A_swing_arm_opener.yaml

Attempting to get the window status ( open or closed ) to display in HA
Levanterman 2 سال پیش
والد
کامیت
382e7b2a26
1فایلهای تغییر یافته به همراه31 افزوده شده و 14 حذف شده
  1. 31 14
      custom_components/tuya_local/devices/ZC34T-03-3A_swing_arm_opener.yaml

+ 31 - 14
custom_components/tuya_local/devices/ZC34T-03-3A_swing_arm_opener.yaml

@@ -6,14 +6,26 @@ products:
 primary_entity:
 primary_entity:
   entity: cover
   entity: cover
   class: window
   class: window
+  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
       mapping:
       mapping:
-        - dps_val: open
+        - dps_val: "open"
           value: open
           value: open
-        - dps_val: close
+        - dps_val: "close"
           value: close
           value: close
         - dps_val: "stop"
         - dps_val: "stop"
           value: stop
           value: stop
@@ -28,6 +40,7 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: lock
           - dps_val: lock
             value: lock
             value: lock
+            default: true
             icon: "mdi:lock"
             icon: "mdi:lock"
           - dps_val: unlock
           - dps_val: unlock
             value: unlock
             value: unlock
@@ -40,10 +53,11 @@ secondary_entities:
         name: sensor
         name: sensor
         optional: true
         optional: true
         mapping:
         mapping:
-          - dps_val: "open"
+          - dps_val: open
             value: open
             value: open
+            default: true
             icon: "mdi:window-open-variant"
             icon: "mdi:window-open-variant"
-          - dps_val: "closed"
+          - dps_val: closed
             value: closed
             value: closed
             icon: "mdi:window-closed-variant"  
             icon: "mdi:window-closed-variant"  
                      
                      
@@ -55,9 +69,10 @@ secondary_entities:
         name: sensor
         name: sensor
         optional: true
         optional: true
         mapping:
         mapping:
-          - dps_val: "rain"
+          - dps_val: rain
             value: rain
             value: rain
-          - dps_val: "fine"
+            default: true
+          - dps_val: fine
             value: fine            
             value: fine            
   - entity: sensor
   - entity: sensor
     name: Fault
     name: Fault
@@ -65,24 +80,24 @@ secondary_entities:
       - id: 105
       - id: 105
         type: string
         type: string
         name: sensor
         name: sensor
-        mapping:
-          - dps_val: "motor_fault"
-            value: motor_fault        
+        # mapping:
+        #   - dps_val: "motor_fault"
+        #     value: motor_fault        
   - entity: switch
   - entity: switch
-    name: Sensor Reminder
+    name: Send Wind/Rain Push Messages
     dps:
     dps:
       - id: 106
       - id: 106
         type: string
         type: string
         name: switch
         name: switch
         optional: true
         optional: true
         mapping:
         mapping:
-          - dps_val: "open"
+          - dps_val: open
             value: open
             value: open
-          - dps_val: "close"
+          - dps_val: close
             value: close
             value: close
 
 
   - entity: switch
   - entity: switch
-    name: Sensor On/Off
+    name: Window switch message Push Messages
     dps:
     dps:
       - id: 107
       - id: 107
         type: string
         type: string
@@ -90,10 +105,11 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: "on"
           - dps_val: "on"
             value: on
             value: on
+            default: true
           - dps_val: "off"
           - dps_val: "off"
             value: off
             value: off
   - entity: switch
   - entity: switch
-    name: On/Off
+    name: Wind and rain sensor detection switch
     dps:
     dps:
       - id: 108
       - id: 108
         type: string
         type: string
@@ -101,5 +117,6 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: "on"
           - dps_val: "on"
             value: on
             value: on
+            default: true
           - dps_val: "off"
           - dps_val: "off"
             value: off
             value: off