I am looking to use the switches in the house (lights) to trigger the alarm. EX: If any of the home residents are not home and a light is turned on or off the alarm should be triggered.
Can you please help me set the trigger for this kind of idea?
PS: I am using the Shelly 1, 1PM and Dimmer 2.
Version HA: 2020.12.7
Operating System Home Assistant OS 5.9
I tried to simplify the example, actually my idea looks like this:
Conditions:
Guest mode: off
Person 1: not home
Person 2: not home
Action:
Send Push notification to Person 1 with 2 options:
Option 1: Activate Alarm
Option 2: Ignore
Trigger: ???
Automation:
alias: Notif Activity
description: 'Home activity: switches on'
trigger:
- platform:
entity_id:
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: state
entity_id: person.r2
state: not_home
- condition: state
entity_id: person.r1
state: not_home
action:
- data:
message: Activity in your home. Turn on alarm?
title: Stare
data:
clickAction: lovelace/panou-central
color: green
group: Stare
importance: default
persistent: 'true'
sticky: 'false'
actions:
- action: trigger_5
title: Da
- action: trigger_6
title: Nu
service: notify.mobile_app_radu_s
mode: single
I was thinking on the situation when a light remained turned on… is there a possibility to use the toggle (change of state) option and also maybe to group the entire switches?
This sounds different than what you described in your first post: detect when a light is turned on when no one is home. Do you still want that or do you want to know if a light was left on when the last person leaves the house? The two requirements are different.