Hi There,
New to the Forum and playing about with IOT devices.
So Currently I have setup a nice little ESP 8266 with a relay to act as a self monitored and smart home alarm. I have managed to configure the manual alarm and set a code to arm and disarm the alarm
My next question though is a toughie for me. I am by no means a developer so forgive me if I do or say something dumb.
I know that home assistant can track both mine and my partners phones. I want it to be able to arm the alarm if both our phones are outside the radius of the home location and to disarm when atleast one device is home.
From my reading I understand I need to group the two phones and then set a state for the group either in(if atleast one device is home) or out(if both devices are gone). then get that to trigger the activation of the alarm. is there anyone out here who could help me with this. I am going a little insane reading through so many posts for the last week and a half. here is what I have in my configuration.yaml thus far.
Blockquote
Loads default set of integrations. Do not remove.
default_config:
Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homeassistant:
customize:
zone.home:
radius: 30
alarm_control_panel:
- platform: manual
name: Home Alarm
code: “****”
arming_time: 30
delay_time: 20
trigger_time: 4
disarmed:
trigger_time: 0
armed_home:
arming_time: 0
delay_time: 0
automation: - alias: ‘Send notification when alarm triggered’
trigger:- platform: state
entity_id: alarm_control_panel.home_alarm
to: “triggered”
action: - service: notify.notify
data:
message: “ALARM! The alarm has been triggered”
automation:
- platform: state
- alias: ‘Send notification when alarm is Disarmed’
trigger:- platform: state
entity_id: alarm_control_panel.home_alarm
to: “disarmed”
action: - service: notify.notify
data:
message: “ALARM! The alarm is Disarmed at {{ states(‘sensor.date_time’) }}”
automation:
- platform: state
- alias: ‘Send notification when alarm is Armed in Away mode’
trigger:- platform: state
entity_id: alarm_control_panel.home_alarm
to: “armed_away”
action: - service: notify.notify
data:
message: “ALARM! The alarm is armed in Away mode {{ states(‘sensor.date_time’) }}”
- platform: state
Blockquote