diff options
Diffstat (limited to 'custom/scripts')
-rw-r--r-- | custom/scripts/play-playlist.yaml | 39 | ||||
-rw-r--r-- | custom/scripts/sleep-and-wake.yaml | 16 |
2 files changed, 40 insertions, 15 deletions
diff --git a/custom/scripts/play-playlist.yaml b/custom/scripts/play-playlist.yaml index 719958c..0823878 100644 --- a/custom/scripts/play-playlist.yaml +++ b/custom/scripts/play-playlist.yaml @@ -91,6 +91,15 @@ play_playlist: target: entity_id: '{{ current }}' + - service: media_player.shuffle_set + data: + shuffle: true + entity_id: '{{ media_player }}' +# - service: media_player.repeat_set +# data: +# repeat: all +# entity_id: '{{ media_player }}' + - conditions: - condition: template value_template: '{{ list == "asgard" }}' @@ -105,6 +114,15 @@ play_playlist: enqueue: play media_content_id: "upnp://4d696e69-444c-164e-9d41-3c7c3f4af5b0/64%240%246%243/" + - service: media_player.shuffle_set + data: + shuffle: true + entity_id: '{{ media_player }}' +# - service: media_player.repeat_set +# data: +# repeat: all +# entity_id: '{{ media_player }}' + - conditions: - condition: template value_template: '{{ list == "download" }}' @@ -119,6 +137,15 @@ play_playlist: enqueue: play media_content_id: "upnp://4d696e69-444c-164e-9d41-3c7c3f4af5b0/64%240%241%240/" + - service: media_player.shuffle_set + data: + shuffle: false + entity_id: '{{ media_player }}' +# - service: media_player.repeat_set +# data: +# repeat: off +# entity_id: '{{ media_player }}' + - conditions: - condition: template value_template: '{{ list == "custom" }}' @@ -130,15 +157,3 @@ play_playlist: - '{{ media_player }}' data: '{{ custom }}' - - - service: media_player.shuffle_set - data: - shuffle: true - target: - entity_id: '{{ media_player }}' - - - service: media_player.repeat_set - data: - repeat: true - target: - entity_id: '{{ media_player }}' diff --git a/custom/scripts/sleep-and-wake.yaml b/custom/scripts/sleep-and-wake.yaml index c8e180d..0fe478d 100644 --- a/custom/scripts/sleep-and-wake.yaml +++ b/custom/scripts/sleep-and-wake.yaml @@ -36,9 +36,12 @@ sleep_and_wake: value_template: '{{ mode == "sleep" }}' sequence: - parallel: + - service: scene.turn_on + target: + entity_id: scene.lg_aircon_power_off - service: switch.turn_off target: - entity_id: switch.smart_power_strip_pro_socket_1 + entity_id: switch.smart_power_strip_pro_socket_2 - service: switch.turn_off target: entity_id: switch.living_lights_right @@ -60,7 +63,7 @@ sleep_and_wake: # entity_id: switch.plugs_office - service: switch.turn_off target: - entity_id: switch.smart_power_strip_pro_socket_1 + entity_id: switch.smart_power_strip_pro_socket_2 - service: switch.turn_off target: entity_id: switch.living_lights_right @@ -104,6 +107,13 @@ sleep_and_wake: value_template: '{{ mode == "sleep" }}' sequence: - parallel: + - service: script.bedroom_aircon_off +# - service: scene.turn_on +# target: +# entity_id: scene.hyundai_aircon2_off + - service: scene.turn_on + target: + entity_id: scene.lg_aircon_power_off # Wait until we fix both sleep and WOL on laptop # - service: switch.turn_off # target: @@ -113,7 +123,7 @@ sleep_and_wake: entity_id: media_player.smartpi - service: switch.turn_off target: - entity_id: switch.smart_power_strip_pro_socket_1 + entity_id: switch.smart_power_strip_pro_socket_2 - service: switch.turn_off target: entity_id: switch.lights_all |