Skip to content

Commit

Permalink
Moes motion switch: changes from review
Browse files Browse the repository at this point in the history
- device naming
- extra attributes
- standardisation of entity names and values
- clearer entity naming and scaling to convenient units for all clock time

PR make-all#2087
  • Loading branch information
make-all authored and timlaing committed Aug 8, 2024
1 parent 159185c commit dac3f9a
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions custom_components/tuya_local/devices/moes_motionsensor_switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,68 +18,75 @@
# 0 for always
# Target Time: Time of day in minutes when motion switch can activate, 0 for
# always
name: MOES Motion Sensor Smart Switch
name: Motion sensor switch
products:
- id: vd5jgg8vgdbaqerq
name: Moes Smart PIR switch
primary_entity:
entity: switch
dps:
- id: 1
name: switch
type: boolean
- id: 44
type: string
name: illuminance_state
- id: 47
type: string
name: motion_state
secondary_entities:
- entity: select
category: config
name: Restore power state
name: Initial state
dps:
- id: 14
name: option
type: string
mapping:
- dps_val: memory
value: Remember Last Status
value: Last state
- dps_val: "on"
value: "On"
- dps_val: "off"
value: "Off"
- entity: select
name: Indicator Light
name: Indicator light
category: config
dps:
- id: 15
name: option
type: string
mapping:
- dps_val: none
value: Indicator LED off
value: "Off"
- dps_val: relay
value: Indicate switch on/off
value: "Status"
- entity: switch
name: Illuminance Switch
name: Illuminance enable
dps:
- id: 43
name: switch
type: boolean
- entity: select
name: Illuminance Threshold
name: Illuminance threshold
category: config
dps:
- id: 45
name: option
type: string
mapping:
- dps_val: default
value: Default Threshold
value: Default
- dps_val: now
value: Current Illuminance
value: Set current
- entity: switch
name: Motion Switch
name: Motion enable
dps:
- id: 46
name: switch
type: boolean
- entity: select
name: Motion Sensitivity
name: Motion sensitivity
category: config
dps:
- id: 48
Expand All @@ -93,7 +100,7 @@ secondary_entities:
- dps_val: "high"
value: "High"
- entity: number
name: Motion Auto-Off Delay
name: Motion auto-off delay
category: config
dps:
- id: 49
Expand All @@ -104,24 +111,28 @@ secondary_entities:
min: 5
max: 3600
- entity: number
name: Appointment Time
name: Disable time
category: config
dps:
- id: 101
name: value
type: integer
unit: min
unit: h
range:
min: 0
max: 1440
mapping:
- scale: 60
- entity: number
name: Target Time
name: Enable time
category: config
dps:
- id: 102
name: value
type: integer
unit: min
unit: h
range:
min: 0
max: 1440
mapping:
- scale: 60

0 comments on commit dac3f9a

Please sign in to comment.