I have an automation that is designed to turn everything off if noone is home, however for whatever reason it doesn’t trigger.
This is weird though as the automation that is supposed to trigger when someone comes back home appears to work fine.
OIt look perfectly fine to me, however hoping a fresh pair of eyes can help me diagnose why its not triggering.
automations.yaml
#Go to Auto Away mode if noone is in
- alias: 'Away Mode'
initial_state: true
trigger:
platform: state
entity_id: binary_sensor.people_home
from: 'on'
to: 'off'
for:
minutes: 10
action:
- service: script.away_mode
- service: notify.all
data:
message: 'Auto Away Mode activated'
- service: script.audio_notify
data_template:
tts_msg: "Auto Away mode activated"
scripts.yaml
## Away mode
away_mode:
sequence:
- service: switch.turn_off
data:
entity_id: switch.bathroom_tv, switch.charlottes_bedroom_light, switch.charlottes_tv_left, switch.charlottes_tv_right, switch.downstairs_bathroom_light, switch.games_consoles, switch.home_audio_1, switch.home_audio_1a, switch.home_audio_1b, switch.home_audio_1c, switch.home_audio_1d, switch.home_audio_2, switch.home_audio_2a, switch.home_audio_2b, switch.home_audio_2c, switch.home_audio_2d, switch.home_office_tv_left, switch.home_office_tv_right, switch.katies_tv_left, switch.katies_tv_right, switch.kitchen_light, switch.kitchen_tv_left, switch.kitchen_tv_right, switch.living_room_light, switch.living_room_tv_left, switch.living_room_tv_right, switch.master_bedroom_light, switch_master_bedroom_tv_b, switch.master_bedroom_tv_c, switch.master_bedroom_tv_d, switch.media_equipment_cupboard, switch.projector_and_screen, switch.utility_room_light, switch.xboxone
- service: light.turn_off
data:
entity_id: light.flux_living_room_tv
- service: nest.set_away_mode
data:
away_mode: away
- service: climate.set_operation_mode
data:
entity_id: climate.entryway
operation_mode: 'eco'
configuration.yaml
# Binary Sensors
binary_sensor:
- platform: template
sensors:
people_home:
friendly_name: 'People Home'
device_class: presence
value_template: >
{{ is_state('person.name1', 'home') or
is_state('person.name2', 'home') or
is_state('person.name3', 'home') or
is_state('person.name4', 'home') }}
I have also checked the state history of the binary sensor and it is changing, not so much over last 24 hours as the weekend but i have seen it changing.
Any help greatly appreciated.