summaryrefslogtreecommitdiffstats
path: root/custom/scripts/sleep-and-wake.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'custom/scripts/sleep-and-wake.yaml')
-rw-r--r--custom/scripts/sleep-and-wake.yaml25
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