mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Add new example for restricting motion sensor lights based on time and using transitions (#6512)
This commit is contained in:
parent
746b3cb303
commit
6c1fc639f7
@ -73,3 +73,36 @@ timer:
|
|||||||
hallway:
|
hallway:
|
||||||
duration: '00:10:00'
|
duration: '00:10:00'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also restrict lights from turning on based on time of day and implement transitions for fading lights on and off.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- alias: Motion Sensor Lights On
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
|
||||||
|
to: 'on'
|
||||||
|
condition:
|
||||||
|
condition: time
|
||||||
|
after: '07:30'
|
||||||
|
before: '23:30'
|
||||||
|
action:
|
||||||
|
service: homeassistant.turn_on
|
||||||
|
entity_id: group.office_lights
|
||||||
|
data:
|
||||||
|
transition: 15
|
||||||
|
|
||||||
|
|
||||||
|
- alias: Motion Sensor Lights Off
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: binary_sensor.ecolink_pir_motion_sensor_sensor
|
||||||
|
to: 'off'
|
||||||
|
for:
|
||||||
|
minutes: 15
|
||||||
|
action:
|
||||||
|
- service: homeassistant.turn_off
|
||||||
|
entity_id: group.office_lights
|
||||||
|
data:
|
||||||
|
transition: 160
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user