diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2023-01-21 01:27:13 +0400 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2023-01-21 01:27:13 +0400 |
commit | 614c8a5f4e3bf26d3af0a91685e00eecb171339b (patch) | |
tree | 94a94b63fb3e10a1ec4bf132bd5e3dde4dafae3b /custom/scripts/sleep-and-wake.yaml | |
parent | 2c0c331eb7b7a03152309bbbd4e0fee157e8d86c (diff) | |
download | hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.tar.gz hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.tar.bz2 hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.tar.xz hass-614c8a5f4e3bf26d3af0a91685e00eecb171339b.zip |
Media controls, occupancy tracking, and fixes
Diffstat (limited to 'custom/scripts/sleep-and-wake.yaml')
-rw-r--r-- | custom/scripts/sleep-and-wake.yaml | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/custom/scripts/sleep-and-wake.yaml b/custom/scripts/sleep-and-wake.yaml index b737e8d..a71518a 100644 --- a/custom/scripts/sleep-and-wake.yaml +++ b/custom/scripts/sleep-and-wake.yaml @@ -48,7 +48,7 @@ sleep_and_wake: value_template: '{{ mode == "hibernate" }}' sequence: - parallel: - - service: media_player.media_stop + - service: media_player.media_pause target: entity_id: media_player.smartpi # Wait until we fix both sleep and WOL on laptop @@ -93,16 +93,22 @@ sleep_and_wake: # - service: switch.turn_off # target: # entity_id: switch.plugs_office + - service: media_player.media_pause + target: + entity_id: media_player.smartpi - service: switch.turn_off target: entity_id: switch.smart_power_strip_pro_socket_1 - service: switch.turn_off target: entity_id: switch.lights_all - # Thats a better way to allow some time for leaving - - service: switch.turn_on - target: - entity_id: switch.hall_lights_right +# Don't do it here, but rather separately when leaving extended home zone +# - service: switch.turn_on +# target: +# entity_id: switch.hall_lights_right + - service: input_boolean.turn_on + target: + entity_id: input_boolean.mode_house_sleep - conditions: - condition: template @@ -114,9 +120,13 @@ sleep_and_wake: - switch.lights_all - switch.plugs_manual - switch.plugs_controlled + # Thats a better way to allow some time for leaving - service: switch.turn_on target: entity_id: switch.hall_lights_right + - service: input_boolean.turn_on + target: + entity_id: input_boolean.mode_house_hibernate - conditions: - condition: template @@ -127,3 +137,8 @@ sleep_and_wake: entity_id: - switch.plugs_kitchen - switch.bedroom_bedsidelampsocket + - service: input_boolean.turn_off + target: + entity_id: + - input_boolean.mode_house_sleep + - input_boolean.mode_house_hibernate |