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.
Hi! Welcome to the forum. You should give this a quick read when you get a minute. Specifically, formatting your code properly makes it much easier for people to help you. (Select any code in your message and click this button/).
As for your question, first thing to consider is are you sure you want your alarm to automatically disarm when a phone enters a zone without any other user intervention? That will mean that if you happen to drop your phone on the sidewalk or somebody who knows how it works gets their hands on your phone they can easily bypass your alarm system. Just make sure you understand that.
So there are several ways to skin this cat. I personally think the easiest would be to create a template sensor that evaluates to true when a phone is home and false when none are. This is a very simple example of such a sensor.
I do understand the risk, the house is currently monitored via CCTV and 2 pitbulls so I guess if someone really wants to get in then yeah they got to risk it. I just want to simplify when I forget to arm that it will actually do it for me. Ill give this a try and see.
I have an automation that does this. Security concerns aside, it works fairly well.
You donât need templates or binary entities that are set based on other entities. Just use the zone enter trigger for a person or device tracker in the trigger section of the automation. Keep it simple.
what I posted is an automation. It must be added into your configuration YAML file under the automation: heading and properly indented. change the entity names accordingly for your install. And if you only have one alarm panel, then delete the second alarm panel disarm service call from my automation. My automation also requires you have at least one device tracker tied to a person.
Your config will fail validation. you have the automation: heading in your configuration yaml 4 times. you already have a separate automation yaml file. put all your automations in there. also the entity youâre tracking for the zone enter needs to be either person. or device_tracker.. what you have now is not a valid entity.
and make sure you change the alarm entity to the name of your alarm. you still have my alarm name in the entity ID. and remove the second service call to disarm in the action section, unless you do actually have an Arlo panel using the Aarlo 3rd-party integration and it is called aarlo_m.
You donât need to use them which is why I said there is more than one way to do it.
When you realize that someone being home or not is going to be the basis for many of your automations youâll be repeating that in many places and if you ever need to change it youâll need to change it everywhere.
Also if you use a template sensor you can easily add additional elements to the template such as a boolean override for testing your automations or when you want to actually leave your house without your phone, you lose your phone etc. etc.
A group does not care about the entity type, you can mix device trackers, booleans and persons and you donât need to specify the state.
If either of them is âpositiveâ they are considered home.
So if you want to make it simple then a group is the better choice.