Home-AssistantConfig/config/automation/zwave_hallway_door_sensor.yaml

77 lines
1.9 KiB
YAML
Raw Normal View History

2018-01-02 00:00:45 +00:00
###################################
## ZWave Section -
## Home Assistant runs on my [Raspberry Pi 3](https://amzn.to/2e3DOBY) with [Aeon Labs Z Wave Stick (GEN 5)](https://amzn.to/2eAiAP0).
2018-01-02 00:00:45 +00:00
###################################
##############################################################
- alias: Hallway ZWave Enerwave Door Sensors Open
2020-07-20 18:33:03 +00:00
id: 1dbd1ba4-6718-4510-b5ab-2a6edd540be4
2018-01-02 00:00:45 +00:00
trigger:
- platform: state
entity_id: binary_sensor.hallway_pantry
2018-01-02 00:00:45 +00:00
to: 'on'
- platform: state
entity_id: binary_sensor.hallway_linen
2018-01-02 00:00:45 +00:00
to: 'on'
condition:
condition: or
conditions:
- condition: sun
after: sunset
after_offset: '-03:00:00'
- condition: numeric_state
entity_id: sensor.pirateweather_cloud_coverage
2018-01-02 00:00:45 +00:00
above: 50
action:
- service: light.turn_on
entity_id:
- light.kids_hallway
- light.k4
- delay: 00:20:00
- service: light.turn_off
entity_id: light.kids_hallway
##############################################################
- alias: ZWave Enerwave Door Sensors Closed
2020-07-20 18:33:03 +00:00
id: ceaeca80-e6dc-4b18-9d77-02cc4b09d272
2018-01-02 00:00:45 +00:00
trigger:
- platform: state
entity_id: binary_sensor.hallway_pantry
2018-01-02 00:00:45 +00:00
to: 'off'
- platform: state
entity_id: binary_sensor.hallway_linen
2018-01-02 00:00:45 +00:00
to: 'off'
action:
service: light.turn_off
entity_id: light.kids_hallway
##############################################################
- alias: Shutdown Helper light
2020-07-20 18:33:03 +00:00
id: e3f4beff-4fa8-42e3-be5a-32b45106ac8a
2018-01-02 00:00:45 +00:00
trigger:
- platform: state
entity_id: light.k4
to: 'on'
for: '00:20:00'
- platform: state
entity_id: binary_sensor.hallway_pantry
2018-01-02 00:00:45 +00:00
to: 'off'
- platform: state
entity_id: binary_sensor.hallway_linen
2018-01-02 00:00:45 +00:00
to: 'off'
condition:
condition: state
entity_id: light.k1
state: 'off'
action:
- service: light.turn_off
entity_id: light.k4