From e7cba4def7c4f13b02890327cef4a670d2c6c3ff Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 25 Nov 2021 00:37:14 +0100 Subject: [PATCH] Add room assistant test automations --- configuration/automations/test-presence.yaml | 77 ++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 configuration/automations/test-presence.yaml diff --git a/configuration/automations/test-presence.yaml b/configuration/automations/test-presence.yaml new file mode 100644 index 0000000..0c5bb30 --- /dev/null +++ b/configuration/automations/test-presence.yaml @@ -0,0 +1,77 @@ +- id: ra-bathroom-enter + alias: '[Bathroom]|(RA) Enter' + mode: single + trigger: + - platform: state + entity_id: sensor.przemyslaws_apple_watch_room_presence + to: ra-bathroom + action: + - service: notify.mobile_app_przemyslaws_iphone + data: + message: Apple Watch enter bathroom + +- id: ra-bathroom-exit + alias: '[Bathroom]|(RA) Leave' + mode: single + trigger: + - platform: state + entity_id: sensor.przemyslaws_apple_watch_room_presence + from: ra-bathroom + action: + - service: notify.mobile_app_przemyslaws_iphone + data: + message: Apple Watch left bathroom + - choose: + - conditions: + - condition: state + entity_id: media_player.bathroom + state: playing + sequence: + - service: media_player.media_pause + target: + entity_id: media_player.bathroom + +- id: ra-bedroom-enter + alias: '[Bedroom]|(RA) Enter' + mode: single + trigger: + - platform: state + entity_id: sensor.przemyslaws_apple_watch_room_presence + to: ra-bedroom + action: + - service: notify.mobile_app_przemyslaws_iphone + data: + message: Apple Watch enter bathroom + +- id: ra-bedroom-exit + alias: '[Bedroom]|(RA) Leave' + mode: single + trigger: + - platform: state + entity_id: sensor.przemyslaws_apple_watch_room_presence + from: ra-bedroom + action: + - service: notify.mobile_app_przemyslaws_iphone + data: + message: Apple Watch left bedroom + - choose: + - conditions: + - condition: state + entity_id: media_player.bedroom + state: playing + sequence: + - service: media_player.media_pause + target: + entity_id: media_player.bathroom + +- id: ra-home-leave + alias: '[Bedroom]|(RA) Enter' + mode: single + trigger: + - platform: state + entity_id: sensor.przemyslaws_apple_watch_room_presence + to: not_home + action: + - service: notify.mobile_app_przemyslaws_iphone + data: + message: Apple Watch left home