mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
alias: Great Room Projector
|
|
id: automation_great_room_projector
|
|
mode: single
|
|
trigger:
|
|
- platform: state
|
|
id: idle_five_min
|
|
entity_id: media_player.downstairs_roku
|
|
not_from: 'unavailable'
|
|
to: 'idle'
|
|
for: '00:05:00'
|
|
- platform: state
|
|
id: home_fifteen_min
|
|
entity_id: media_player.downstairs_roku
|
|
not_from: 'unavailable'
|
|
to: 'home'
|
|
for: '00:15:00'
|
|
- platform: state
|
|
id: playing_fifteen_min
|
|
entity_id: media_player.downstairs_roku
|
|
from: 'playing'
|
|
for: '00:15:00'
|
|
- platform: state
|
|
id: from_idle
|
|
entity_id: media_player.downstairs_roku
|
|
from: 'idle'
|
|
|
|
condition:
|
|
alias: "Roku not unavailable"
|
|
condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.downstairs_roku
|
|
state: unavailable
|
|
|
|
action:
|
|
- choose:
|
|
# The project turns on at seemingly random times.
|
|
# commenting this out to see if that fixes the problem
|
|
# - alias: "Roku no longer idle, turn on projector"
|
|
# conditions:
|
|
# - condition: trigger
|
|
# id: from_idle
|
|
# - condition: state
|
|
# entity_id: switch.shelly_projector
|
|
# state: 'off'
|
|
# sequence:
|
|
# - service: switch.turn_on
|
|
# data:
|
|
# entity_id: switch.shelly_projector
|
|
- alias: "Roku idle or unused, turn off projector"
|
|
conditions:
|
|
# - condition: state
|
|
# entity_id: switch.shelly_projector
|
|
# state: 'on'
|
|
- condition: or
|
|
conditions:
|
|
- condition: trigger
|
|
id: idle_five_min
|
|
- condition: trigger
|
|
id: home_fifteen_min
|
|
sequence:
|
|
# - service: switch.turn_off
|
|
# target:
|
|
# entity_id: switch.shelly_projector
|
|
- service: input_boolean.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: input_boolean.great_room_light_cycle
|
|
default: []
|