Hello Everyone,
So I have set up an automation for (Alexa Guard), because I live in a house of two people I need it to work in a special way.
For Example:
- When both of us leave the house, Alexa will automatically start guarding (CONFIG WIFI SSID STATE)
- If either one of us comes back, Alexa will stop guarding (CONFIG WIFI SSID STATE)
(both of us have to have left the wifi network to start guarding)
(only one has to be connected to stop guarding)
As shown above I am trying to configure this via our mobile’s being connected/disconnected to our router (STATE CHANGE).
Here’s my code:
x2 Triggers:
platform: state
for:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
entity_id: sensor.my_iphone_ssid
from: My_WIFI_SSID
platform: state
for:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
entity_id: sensor.myfriends_iphone_ssid
from: MY_WIFI_SSID
SHOULD I THEN PUT A CONDITION HERE (FOR THE TWO PEOPLE TO BE OFF THE NETWORK TO START GUARDING) AND (SOME CONDITION THAT RECOGNISES THAT ONE IS BACK SO IT STARTS GUARDING AGAIN)?
ACTION:
service: alarm_control_panel.alarm_away
target:
entity_id: alarm_control_panel.alexa_guard_5af39
data:
code: 'type: call_service'
I KNOW THE ABOVE WILL START GUARDING BUT I ALSO NEED ANOTHER ACTION (STOP GUARDING) CAN I PUT IT IN HERE OR DO I NEED TO MAKE A WHOLE NEW ONE UP?