Skip to content

Create neatsvor_x520ru_vacuum.yaml #2988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
153 changes: 153 additions & 0 deletions custom_components/tuya_local/devices/neatsvor_x520ru_vacuum.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: neatsvor_x520_vacuum_cleaner
products:
- id: dbougox8k7ntyxeh
name: Neatsvor X520RU
manufacturer: Neatsvor
model: X520RU
entities:
- entity: vacuum
dps:
- id: 1
type: boolean
name: power
- id: 2
type: boolean
name: activate
- id: 3
type: string
name: command
mapping:
- dps_val: "standby"
value: "standby"
- dps_val: "smart"
value: "smart"
- dps_val: "wall_follow"
value: "wall_follow"
- dps_val: "mop"
value: "mop"
- dps_val: "spiral"
value: "clean_spot"
- dps_val: "chargego"
value: "return_to_base"
- id: 5
type: string
name: status
mapping:
- dps_val: "0"
value: "Standby"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be all lower case to be picked up by the vacuum entity as a supported state.

- dps_val: "1"
value: "Smart cleaning"
- dps_val: "2"
value: "Mopping"
- dps_val: "3"
value: "Cleaning along the walls"
- dps_val: "4"
value: "Recharging"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "charging" to be interpreted correctly.

- dps_val: "5"
value: "Charging"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what the difference is supposed to be between "Recharging" and "Charging". Is one supposed to be "charged"?

- dps_val: "6"
value: "Spot cleaning"
- dps_val: "7"
value: "Manual cleaning"
- id: 14
type: string
name: fan_speed
optional: true
mapping:
- dps_val: "max"
value: "max"
- dps_val: "strong"
value: "strong"
- dps_val: "normal"
value: "normal"
- dps_val: "weak"
value: "weak"
- id: 18
type: bitfield
name: error
mapping:
- dps_val: 2
value: "side scan exception"
- dps_val: 4
value: "middle scan exception"
- dps_val: 8
value: "left wheel exception"
- dps_val: 16
value: "right wheel exception"
- dps_val: 32
value: "garbage box exception"
- dps_val: 64
value: "ground inspection exception"
- dps_val: 128
value: "collision exception"
- dps_val: 256
value: "Other problems"
- entity: sensor
class: battery
dps:
- id: 6
name: sensor
type: integer
unit: "%"
class: measurement
- entity: sensor
name: Last cleaning area
icon: mdi:floor-plan
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use class: area instead of the icon.

dps:
- id: 16
name: sensor
type: integer
unit: m²
class: measurement
mapping:
- scale: 10
- entity: sensor
class: duration
name: Last cleaning duration
dps:
- id: 17
name: sensor
type: integer
unit: min
class: measurement
- entity: select
name: Language
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use translation_key: language instead of name and icon.

category: config
icon: mdi:earth
dps:
- id: 29
type: string
name: option
mapping:
- dps_val: "russian"
value: "russian"
- dps_val: "english"
value: "english"
- entity: select
name: Water step
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use translation_key: mopping instead of the name and icon here, and map the values to "low", "medium" and "high" (also "auto" and "off" are supported values if you later find it supports those).

category: config
icon: "mdi:water"
dps:
- id: 101
type: string
name: option
mapping:
- dps_val: "low_step"
value: "low"
- dps_val: "mid_step"
value: "mid"
- dps_val: "high_step"
value: "high"
- entity: switch
name: Mute
category: config
icon: mdi:bell-cancel-outline
dps:
- id: 102
type: boolean
name: switch
mapping:
- dps_val: true
value: false
- dps_val: false
value: true