Skip to content

Commit

Permalink
Lefant N3: juggle power_go and pause dps
Browse files Browse the repository at this point in the history
- mark 4, 6, 7, 126 as optional, as they seem to not appear for another user
- based on reported behaviour, try power_go as power, pause as activate inverted.
I think this was already tried for TTEC vacuum and did not work there, but maybe
the vacuums act differently.
- based on commands not seeming to work, make them also trigger power and switch_charge dps as appropriate.

Issue make-all#1393
  • Loading branch information
make-all authored and timlaing committed Aug 8, 2024
1 parent db157d8 commit 3bea2d2
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions custom_components/tuya_local/devices/lefant_n3_vacuum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,51 @@ primary_entity:
entity: vacuum
dps:
- id: 1
name: power
type: boolean
- id: 2
name: activate
type: boolean
mapping:
- dps_val: true
value: false
- dps_val: false
value: true
- id: 3
name: switch_charge
type: boolean
optional: true
hidden: true
- id: 4
name: command
name: work_mode
type: string
optional: true
mapping:
- dps_val: smart
value: clean
conditions: power
constraint:
- dps_val: true
value: smart
- dps_val: chargego
value: return_to_base
constraint: switch_charge
conditions:
- dps_val: true
value: return_to_base
- dps_val: zone
value: clean_zone
constraint: power
conditions:
- dps_val: true
value: clean_zone
- dps_val: pose
value: clean_spot
constraint: power
conditions:
- dps_val: true
value: clean_spot
- dps_val: part
value: clean_partial
constraint: power
conditions:
- dps_val: true
value: clean_partial
- dps_val: fastmapping
value: map
- dps_val: CleanModeSectorbased
Expand Down Expand Up @@ -190,6 +219,7 @@ primary_entity:
name: scheduled_clean
- id: 126
type: boolean
optional: true
name: map_saved
secondary_entities:
- entity: button
Expand Down Expand Up @@ -224,6 +254,7 @@ secondary_entities:
dps:
- id: 6
type: integer
optional: true
name: sensor
unit: min
class: measurement
Expand All @@ -234,6 +265,7 @@ secondary_entities:
dps:
- id: 7
type: integer
optional: true
name: sensor
unit: m2
class: measurement
Expand Down

0 comments on commit 3bea2d2

Please sign in to comment.