From dfe18853d5acc47575772ba75fe391e75783b619 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Tue, 11 Apr 2023 07:06:27 +0200 Subject: [PATCH] attempt to make notification --- include/automations/derernogenihuset.yaml | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 include/automations/derernogenihuset.yaml diff --git a/include/automations/derernogenihuset.yaml b/include/automations/derernogenihuset.yaml new file mode 100644 index 0000000..8a3c15a --- /dev/null +++ b/include/automations/derernogenihuset.yaml @@ -0,0 +1,58 @@ + - alias: 'Der er nogen i huset' + trigger: + - platform: state + entity_id: binary_sensor.hue_motion_sensor_2_motion_2 + to: 'on' + - platform: state + entity_id: binary_sensor.hue_motion_sensor_2_motion + to: 'on' + - platform: state + entity_id: binary_sensor.hue_motion_sensor_1_motion_2 + to: 'on' + - platform: state + entity_id: binary_sensor.bad_motion_sensor_motion + to: 'on' + - platform: state + entity_id: binary_sensor.gang_sensor_motion + to: 'on' + - platform: state + entity_id: binary_sensor.forgang_sensor_motion + to: 'on' + condition: + platform: state + entity_id: zone.home + to: "0" + + action: + - service: notify.mobile_app_clausiphone + data: + message: "Der er nogen i huset" +# - service: script.sonos_say +# data: +# sonos_entity: media_player.alrum +# volume: 0.4 +# delay: '00:00:05' +# message: 'Der er nogen i indkørslen' + - service: scene.create + data: + scene_id: before + snapshot_entities: + - light.pendle1 + - service: light.turn_on + data: + entity_id: light.pendle1 + brightness: 255 + rgb_color: [255, 0, 0] + flash: long + - delay: 2 + - service: scene.turn_on + entity_id: scene.before + + + +# - service: script.sonos_say +# data: +# sonos_entity: media_player.kontor +# volume: 0.7 +# message: 'Hej Claus er det dig der går i gangen?' +# delay: '00:00:05'