Files
Home-Assistant-Configs/scripts.yaml
Tony Stork b0dbdd2c7c Re-organized presence detection
Seeing if this will work better than the previous way.
2022-01-02 22:34:25 -05:00

207 lines
4.9 KiB
YAML

start_netflix:
alias: Start Netflix
sequence:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: com.netflix.ninja
mode: single
icon: mdi:netflix
stop_netflix:
alias: Stop Netflix
sequence:
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: '!com.netflix.ninja'
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
mode: single
icon: mdi:netflix
give_me_darkness:
alias: Give Me Darkness
sequence:
- service: switch.turn_on
target:
entity_id:
- switch.adaptive_lighting_sleep_mode_upstairs_hallway
- switch.adaptive_lighting_sleep_mode_mud_room
- service: light.turn_off
target:
device_id:
- cfa5796f2572082c37db92f809e432bc
- 3ccbb8face40bff22fd924966bbb19f5
area_id:
- kallen_bedroom
- master_bedroom
mode: single
icon: mdi:weather-night
start_youtube:
alias: Start Youtube
sequence:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: com.amazon.firetv.youtube
mode: single
icon: mdi:youtube
stop_youtube:
alias: Stop Youtube
sequence:
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: '!com.amazon.firetv.youtube'
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
mode: single
icon: mdi:youtube
start_twitch:
alias: Start Twitch
sequence:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: tv.twitch.android.viewer
mode: single
icon: mdi:twitch
stop_twitch:
alias: Stop Twitch
sequence:
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: '!tv.twitch.android.viewer'
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
mode: single
icon: mdi:twitch
start_spotify:
alias: Start Spotify
sequence:
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: com.spotify.tv.android
mode: single
icon: mdi:spotify
stop_spotify:
alias: Stop Spotify
sequence:
- service: media_player.select_source
target:
entity_id: media_player.living_room_firetv
data:
source: '!com.spotify.tv.android'
mode: single
icon: mdi:spotify
goodnight:
alias: Goodnight
sequence:
- service: scene.turn_on
target:
entity_id:
- scene.upstairs_hallway_nightlight
- scene.mud_room_nightlight
- service: light.turn_off
target:
device_id:
- cfa5796f2572082c37db92f809e432bc
- 3ccbb8face40bff22fd924966bbb19f5
area_id:
- basement_studio
- master_bedroom
- kallen_bedroom
- furnace_room
- mud_room
- nursery
- service: switch.turn_off
target:
area_id: basement_studio
- service: switch.turn_on
target:
entity_id:
- switch.basement_echo_dot_do_not_disturb_switch
- switch.living_room_echo_dot_do_not_disturb_switch
mode: single
icon: mdi:weather-night
alexa_tts_test:
alias: Alexa TTS Test
sequence:
- service: notify.alexa_media
data:
data:
method: all
type: announce
target: Living Room Echo Dot
message: I farted
mode: single
icon: mdi:test-tube
family_is_away:
alias: Family Is Away
sequence:
- condition: state
entity_id: group.family
state: not_home
- service: light.turn_off
target:
area_id:
- basement_studio
- furnace_room
- kallen_bedroom
- living_room
- master_bedroom
- mud_room
- nursery
- upstairs_hallway
- service: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.alexa_guard_9ee3b
mode: single
icon: mdi:shield-lock
family_is_home:
alias: Family Is Home
sequence:
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.alexa_guard_9ee3b
- condition: state
entity_id: binary_sensor.night
state: 'on'
- service: light.turn_on
target:
area_id:
- living_room
- mud_room
data: {}
- service: light.turn_off
target:
area_id:
- furnace_room
- kallen_bedroom
- nursery
- master_bedroom
- upstairs_hallway
- basement_studio
mode: single
icon: mdi:home-account