1
0
ansible-home-assistant/roles/automations/files/bathroom-toothbrush.yaml

28 lines
742 B
YAML

- id: bathroom_toothbrush_on
alias: '[Bathroom] Toothbrush on'
mode: single
trigger:
- platform: state
to: running
entity_id: sensor.smart_series_7000_a19f_toothbrush_state
action:
- service: script.bathroom_mirror_lights_on
- choose:
- conditions:
- condition: time
after: "08:00:00"
before: "23:00:00"
sequence:
- service: script.bathroom_music_on
- id: bathroom_toothbrush_picked_up
alias: '[Bathroom] Toothbrush picked-up'
mode: single
trigger:
- platform: state
entity_id: sensor.smart_series_7000_a19f_toothbrush_state
from: unavailable
to: 'off'
action:
- service: script.bathroom_mirror_lights_on