Hello. Below is my current setup. If moving is detected in certain rooms, the criteria being that Alexa Guard is turned on, mobile phones are not connected to WIFI, etc. This all works. BUT, what I am also trying to do is how to set up the following.
I have an input_boolean called “vacation”. This is a manual button that I must turn on before I go on a long trip. I have cats and dogs. We normally leave all doors open throughout the day. On longer trips, like all day or overnight trips, or if I put my animals in a pet hotel, I will close all doors. Having door sensors on all doors of the house, I like to activate these when Vacation mode is on.
So, I had a trigger that I had to disable, the door sensor is called “Antonio Office Door”. What I want is for a trigger to fire, only when in vacation mode. I do not want to add Vacation Mode in Conditions because it will stop everything from happening. So, if Vacation mode is not in Conditions, I have other sensors firing this automation, how do I set up a trigger and condition in one. I hope I explained correctly.
Thanks in advanced.
alias: Guard Motion Detected While On
description: ""
trigger:
- type: motion
platform: device
device_id: 94eaec9f2fe634f13f5c0701dd7b5bcb
entity_id: binary_sensor.master_bathroom_motion_sensor_occupancy
domain: binary_sensor
- type: motion
platform: device
device_id: 4341b79ee01d81d804c25a4256f7f57b
entity_id: binary_sensor.guest_bathroom_motion_sensor_occupancy
domain: binary_sensor
- type: motion
platform: device
device_id: 4b54eb38d880760bf903a2910e6c813d
entity_id: binary_sensor.serenity_office_motion_sensor_occupancy
domain: binary_sensor
- type: motion
platform: device
device_id: f2f573f767d0f15a11dacbda0155b973
entity_id: binary_sensor.antonio_office_motion_sensor_occupancy
domain: binary_sensor
- type: opened
platform: device
device_id: bc4cf98bc22056d881d4796ed02ab5ee
entity_id: binary_sensor.antonio_office_door_contact
domain: binary_sensor
- type: opened
platform: device
device_id: 3127c085b968bc56ceff471a6c64cd18
entity_id: binary_sensor.front_door_contact
domain: binary_sensor
- type: opened
platform: device
device_id: 061f292cfe0ec96d6a7ce3d636f90f80
entity_id: binary_sensor.back_door_contact
domain: binary_sensor
- type: opened
platform: device
device_id: bc4cf98bc22056d881d4796ed02ab5ee
entity_id: 3c28a24dccb525a17880c9e96a7e246f
domain: binary_sensor
enabled: false
condition:
- condition: state
entity_id: input_boolean.guard_indicator
state: "on"
- condition: state
entity_id: input_boolean.alarm_triggered
state: "off"
- condition: state
entity_id: alarm_control_panel.alexa_guard_b677e
state: armed_away
- condition: not
conditions:
- condition: state
entity_id: sensor.moto_g_stylus_5g_antonio_wifi_connection
state: AntonioLuvsSerenity
- condition: state
entity_id: sensor.moto_g_stylus_5g_serenity_wifi_connection
state: AntonioLuvsSerenity
- condition: state
entity_id: sensor.moto_g_stylus_5g_antonio_wifi_connection
state: SerenityLuvsAntonio
- condition: state
entity_id: sensor.moto_g_stylus_5g_serenity_wifi_connection
state: SerenityLuvsAntonio
action:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.alarm_triggered
- service: switch.turn_off
data: {}
target:
area_id:
- night_lights
- antonio_s_office
- bedroom
- chargers
- guest_bathroom
- master_bathroom
- outside
- serenity_s_office
- south_hallway
- kitchen
- living_room
enabled: true
- service: light.turn_off
data: {}
target:
area_id:
- antonio_s_office
- bedroom
- kitchen
- living_room
- north_hallway
- south_hallway
- serenity_s_office
- guest_bathroom
- master_bathroom
- outside
enabled: true
- service: lock.lock
data: {}
target:
entity_id: lock.antoniominipc_powershell
- service: button.press
data: {}
target:
entity_id: button.serenityedward_powershell
- service: notify.notify
data:
message: MOTION DETECTED WHILE GUARD IS ON.
title: ALARM TRIGGERED. ALARM TRIGGERED.
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.volume_9_everywhere
- service: persistent_notification.create
data:
title: Alarm triggered. Alarm triggered.
message: Motion detected while guard is on.
- service: notify.antoniominipc
data:
message: Motion detected while guard is on.
title: Alarm triggered. Alarm triggered.
- type: turn_on
device_id: 5617b2eae55bc8ffbea083cbfe4cda0a
entity_id: switch.antonio_work_computer_strip_3
domain: switch
- repeat:
count: "5"
sequence:
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: light.turn_on
data:
brightness_pct: 100
color_name: red
target:
entity_id: light.alarm_lights
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness_pct: 0
color_name: grey
target:
entity_id: light.alarm_lights
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- service: light.turn_on
data:
rgb_color:
- 255
- 255
- 255
brightness_pct: 100
target:
entity_id: light.alarm_lights
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness_pct: 0
color_name: gray
target:
entity_id: light.alarm_lights
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness_pct: 100
color_name: blue
target:
entity_id: light.alarm_lights
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
enabled: true
- service: light.turn_on
data:
brightness_pct: 0
color_name: gray
target:
entity_id: light.alarm_lights
- service: notify.alexa_media_bathroom_master_dot
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: notify.alexa_media_bathroom_guest_dot
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: notify.alexa_media_antonio_s_office_echo
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: notify.alexa_media_serenity_s_office_echo
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
enabled: true
- service: notify.alexa_media_living_room_right_echo
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: notify.alexa_media_antonio_s_dot
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: notify.alexa_media_hallway_south_dot
data:
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: tts.google_translate_say
data:
cache: false
entity_id: media_player.antoniominipc_hass
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: tts.google_translate_say
data:
cache: false
entity_id: media_player.living_room_speaker
message: >-
Alarm triggered. Alarm triggered. Get out of the house. The police
has been called. Leave now.
- service: light.turn_on
data:
brightness_pct: 100
color_name: red
target:
area_id:
- antonio_s_office
- bedroom
- guest_bathroom
- kitchen
- living_room
- master_bathroom
- north_hallway
- outside
- serenity_s_office
- south_hallway
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.guard_on_triggered
- input_boolean.alarm_triggered
- service: switch.turn_off
data: {}
target:
entity_id: switch.antonio_work_computer_strip_3
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.guard_indicator
- service: switch.turn_on
data: {}
target:
area_id: night_lights
entity_id: switch.night_lights
mode: single