Many curtains seem to match dps 1, 2, 3, 5, so catch them all by not requiring dp 7 which doesn't seem to work anyway. Add optional fault dp on 12, as per Loonas smart curtain. Issue #367
@@ -1,7 +1,7 @@
-name: Zemismart curtain rail
+name: Simple curtain
primary_entity:
entity: cover
- class: blind
+ class: curtain
dps:
- id: 1
name: control
@@ -29,11 +29,37 @@ primary_entity:
max: 100
mapping:
- invert: true
- - id: 5
- name: control_back_mode
- type: boolean
- id: 7
name: work_state
type: string
+ optional: true
# seems intended to match action, but doesn't change in observation
+ - id: 12
+ name: fault_code
+ type: bitfield
+secondary_entities:
+ - entity: switch
+ name: Reverse
+ category: config
+ icon: "mdi:arrow-u-down-left"
+ dps:
+ - id: 5
+ type: boolean
+ name: switch
+ - entity: binary_sensor
+ name: Fault
+ class: problem
+ category: diagnostic
+ name: sensor
+ mapping:
+ - dps_val: 0
+ value: false
+ - dps_val: null
+ - value: true