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

Yueqing combo curtain: merge into identical Loonas config

Even product id was matched.
Jason Rumney 1 год назад
Родитель
Сommit
d4a4c2d044

+ 5 - 0
custom_components/tuya_local/devices/loonas_curtain.yaml

@@ -1,4 +1,5 @@
 name: Curtain
+legacy_type: yueqingcombo_yet848pc_curtain
 products:
   - id: wraaecjqfiirj8go
     name: Loonas curtain motor
@@ -45,11 +46,15 @@ secondary_entities:
       - id: 5
         type: string
         name: switch
+        optional: true
         mapping:
           - dps_val: back
             value: true
           - dps_val: forward
             value: false
+          - dps_val: null
+            value: false
+            hidden: true
   - entity: binary_sensor
     class: problem
     category: diagnostic

+ 0 - 71
custom_components/tuya_local/devices/yueqingcombo_yet848pc_curtain.yaml

@@ -1,71 +0,0 @@
-name: Curtain
-products:
-  - id: wraaecjqfiirj8go
-    name: Yueing Combo YET848PC
-primary_entity:
-  entity: cover
-  class: curtain
-  dps:
-    - id: 1
-      type: string
-      optional: true
-      name: control
-      mapping:
-        - dps_val: open
-          value: open
-        - dps_val: stop
-          value: stop
-        - dps_val: close
-          value: close
-    - id: 2
-      name: position
-      type: integer
-      range:
-        min: 0
-        max: 100
-      mapping:
-        - invert: true
-    - id: 3
-      name: current_position
-      type: integer
-      range:
-        min: 0
-        max: 100
-      mapping:
-        - invert: true
-secondary_entities:
-  - entity: select
-    name: Motor direction
-    icon: "mdi:sign-direction"
-    category: config
-    dps:
-      - id: 5
-        type: string
-        name: option
-        optional: true
-        mapping:
-          - dps_val: forward
-            value: Clockwise
-          - dps_val: back
-            value: Anti-clockwise
-          - dps_val: null
-            value: Clockwise
-            hidden: true
-  - entity: binary_sensor
-    class: problem
-    category: diagnostic
-    dps:
-      - id: 12
-        type: bitfield
-        optional: true
-        name: sensor
-        mapping:
-          - dps_val: 0
-            value: false
-          - dps_val: null
-            value: false
-          - value: true
-      - id: 12
-        type: bitfield
-        optional: true
-        name: fault_code