Skip to content
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

ZY-M100: add missing features #919

Merged
merged 1 commit into from
Jul 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 40 additions & 19 deletions custom_components/tuya_local/devices/zym100_presence_sensor.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: mmWave presence sensor
products:
- id: k2h8vkj98fhvnpiv
name: ZY-M100 WiFi
name: ZY-M100-WIFI
primary_entity:
entity: binary_sensor
class: occupancy
Expand All @@ -14,17 +14,11 @@ primary_entity:
value: true
- dps_val: none
value: false
- id: 101
type: integer
name: detection_delay
- id: 102
type: integer
name: fading_time
secondary_entities:
- entity: number
name: Sensitivity
category: config
icon: "mdi:"
icon: "mdi:motion-sensor"
dps:
- id: 2
type: integer
Expand All @@ -35,12 +29,12 @@ secondary_entities:
- entity: number
name: Minimum distance
category: config
icon: "mdi:arrow-collapse"
icon: "mdi:arrow-collapse-left"
dps:
- id: 3
type: integer
name: value
unit: m
unit: m
range:
min: 0
max: 1000
Expand All @@ -50,12 +44,12 @@ secondary_entities:
- entity: number
name: Maximum distance
category: config
icon: "mdi:arrow-collapse"
icon: "mdi:arrow-collapse-right"
dps:
- id: 4
type: integer
name: value
unit: m
unit: m
range:
min: 0
max: 1000
Expand Down Expand Up @@ -87,7 +81,7 @@ secondary_entities:
- entity: sensor
name: Target distance
class: distance
category: diagnostic
icon: "mdi:tape-measure"
dps:
- id: 9
type: integer
Expand All @@ -96,16 +90,43 @@ secondary_entities:
class: measurement
mapping:
- scale: 100
- entity: number
name: Detection delay
category: config
# mode: box
icon: "mdi:timer-sand"
dps:
- id: 101
type: integer
name: value
unit: s
range:
min: 1
max: 100
mapping:
- scale: 10
step: 1
- entity: number
name: Fading time
category: config
icon: "mdi:timer-sand-complete"
dps:
- id: 102
type: integer
name: value
unit: s
range:
min: 5
max: 15000
mapping:
- scale: 10
step: 5
- entity: sensor
name: Illuminance lux
name: Illuminance
class: illuminance
category: diagnostic
dps:
- id: 104
type: integer
name: sensor
unit: lx
class: measurement
range:
min: 0
max: 1000
class: measurement