Files
fresh-home/automations/things/handle_dreamsurface_brightness.yaml
T
2024-04-14 14:24:35 -04:00

48 lines
1.1 KiB
YAML

alias: Handle DreamSurface Brightness
id: handle_dreamsurface_brightness
description: "Handle DreamSurface Brightness"
trigger:
- platform: state
id: going_to_bed
entity_id: input_boolean.clint_in_bed
from: "off"
to: "on"
- platform: state
id: waking_up
entity_id: input_boolean.clint_in_bed
from: "on"
to: "off"
# condition:
# - alias: "The home is occupied"
# condition: state
# entity_id: input_boolean.home_occupied
# state: "on"
# - alias: "Its not bedtime"
# condition: state
# entity_id: input_boolean.bedtime
# state: "off"
action:
- choose:
- conditions:
- condition: trigger
id: going_to_bed
sequence:
- service: button.press
data: {}
target:
entity_id: button.dreamsurface_low_brightness
- conditions:
- condition: trigger
id: waking_up
sequence:
- service: button.press
data: {}
target:
entity_id: button.dreamsurface_normal_brightness