diff --git a/automations.yaml b/automations.yaml index 974d2ae..08afce9 100644 --- a/automations.yaml +++ b/automations.yaml @@ -524,36 +524,60 @@ to: 'on' from: 'off' id: emma-on + alias: Emma On - platform: state entity_id: - input_boolean.white_noise_basement to: 'on' from: 'off' id: basement-on + alias: Basement On - platform: state entity_id: - input_boolean.white_noise_kallen_bedroom to: 'on' from: 'off' id: kallen-on + alias: Kallen On - platform: state entity_id: - input_boolean.white_noise_emma_bedroom from: 'on' to: 'off' id: emma-off + alias: Emma Off - platform: state entity_id: - input_boolean.white_noise_basement from: 'on' to: 'off' id: basement-off + alias: Basement Off - platform: state entity_id: - input_boolean.white_noise_kallen_bedroom from: 'on' to: 'off' id: kallen-off + alias: Kallen Off + - alias: Emma Timeout + platform: state + id: emma-timeout + entity_id: + - media_player.emma_bedroom_google_speaker + to: 'off' + - alias: Basement Timeout + platform: state + id: basement-timeout + entity_id: + - media_player.basement_google_speaker + to: 'off' + - alias: Kallen Timeout + platform: state + id: kallen-timeout + entity_id: + - media_player.kallen_bedroom_google_speaker + to: 'off' condition: [] action: - choose: @@ -572,14 +596,15 @@ target: entity_id: media_player.emma_bedroom_google_speaker alias: Set volume + alias: Emma On - conditions: - condition: trigger id: basement-on sequence: - - alias: Start river sounds - service: google_assistant_sdk.send_text_command + - service: google_assistant_sdk.send_text_command data: command: give me thunderstorm sounds on basement studio speaker + alias: Start thunderstorm sounds - service: media_player.volume_set data: volume_level: '{{ states(''input_number.basement_google_speaker_night_volume'') @@ -587,6 +612,7 @@ target: entity_id: media_player.basement_google_speaker alias: Set volume + alias: Basement On - conditions: - condition: trigger id: kallen-on @@ -602,6 +628,7 @@ target: entity_id: media_player.kallen_bedroom_google_speaker alias: Set volume + alias: Kallen On - conditions: - condition: trigger id: emma-off @@ -631,6 +658,7 @@ target: entity_id: media_player.emma_bedroom_google_speaker alias: Reset volume + alias: Emma Off - conditions: - condition: trigger id: basement-off @@ -654,6 +682,7 @@ target: entity_id: media_player.basement_google_speaker alias: Reset volume + alias: Basement Off - conditions: - condition: trigger id: kallen-off @@ -688,8 +717,96 @@ target: entity_id: media_player.kallen_bedroom_google_speaker alias: Reset volume + alias: Kallen Off + - conditions: + - condition: trigger + id: + - emma-timeout + sequence: + - alias: Reset white noise + if: + - condition: state + entity_id: input_boolean.white_noise_emma_bedroom + state: 'on' + alias: Check if white noise is still desired + then: + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - alias: Start river sounds + service: google_assistant_sdk.send_text_command + data: + command: give me river noise on emma bedroom speaker + - service: media_player.volume_set + data: + volume_level: '{{ states(''input_number.emma_bedroom_google_speaker_night_volume'') + }}' + target: + entity_id: media_player.emma_bedroom_google_speaker + alias: Set volume + alias: Emma Timeout + - conditions: + - condition: trigger + id: + - basement-timeout + sequence: + - alias: Reset white noise + if: + - alias: Check if white noise is still desired + condition: state + entity_id: input_boolean.white_noise_basement + state: 'on' + then: + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - alias: Start thunderstorm sounds + service: google_assistant_sdk.send_text_command + data: + command: give me thunderstorm sounds on basement studio speaker + - service: media_player.volume_set + data: + volume_level: '{{ states(''input_number.basement_google_speaker_night_volume'') + }}' + target: + entity_id: media_player.basement_google_speaker + alias: Set volume + alias: Basement Timeout + - conditions: + - condition: trigger + id: + - kallen-timeout + sequence: + - alias: Reset white noise + if: + - alias: Check if white noise is still desired + condition: state + entity_id: input_boolean.white_noise_kallen_bedroom + state: 'on' + then: + - delay: + hours: 0 + minutes: 0 + seconds: 5 + milliseconds: 0 + - alias: Start river sounds + service: google_assistant_sdk.send_text_command + data: + command: give me river noise on kallen bedroom speaker + - service: media_player.volume_set + data: + volume_level: '{{ states(''input_number.kallen_bedroom_google_speaker_night_volume'') + }}' + target: + entity_id: media_player.kallen_bedroom_google_speaker + alias: Set volume + alias: Kallen Timeout mode: parallel - max: 10 + max: 20 - id: '1671584633378' alias: Delivery Mode Cleanup description: ''