Change zone radius based on presence?

I would like to set up an automation that changes the radius of my home zone based on if someone is home or not. I’m just not sure what the syntax would be for the radius value when setting it in an action. Would this need to be done with templating?

Would it be easier to just have two zones and build automations based on those?
I have my home zone, then a home radius zone that I use for turning on heaters.

hmm yeah possibly, but how do you switch between the two?

Technically when I’m in my home zone, I’m also in the home_radius zone. So I just base my automations on that.
home_radius = heaters/AC come on
home = lights, alarm system, door locks…etc

Maybe if you explain your exact scenario for differing zone radiuses I can advise on how to proceed.

I dunno this sounds more comlplicated that it needs to be.

BAsically all I want to do is:

If no one is home, then set zone radius to x
If someone is home, then set zone radius to y

It’s a simple trigger, action automation, I just need to figure out how to change the value of the radius.

To achieve what?

This is an XY problem. Please tell us what you are trying to achieve, so that we can help you achieve your goal.

No, it isn’t, because you can’t set these values on the fly.

1 Like

My question though is why you want the radius to change? My home radius is 50 meters all the time, because that is where my house is.

Your response comes off aggressive. Is my post upsetting you?

XY problem? I don’t know what you mean by that. I’m just saying I want to change the value of the radius.

What am I trying to achieve… I already said. When no one is home, I want to increase the radius of the zone, when someone is home, I want to reduce the radius of the zone.

I want to change it to enhance my presence detections time until it notices that I am gone or home. Sometimes my location for some of my device trackers get stuck a certain distance away from my house right outside my zone radius. I don’t want to just increase my zone radius permanently because then it will take that much longer to recognize that the device trackers are outside of my home zone.

Have you looked into using multiple presence detection systems? I use GPS logger for when I’m out and about and nmap for when I’m home. This combination makes sure that it only uses my GPS when I’m not connected to my home wifi, leading to very accurate presence detection.

Yes, my presence detection is fine. I use 3 methods and a Bayesian sensor. I’m just trying to try something with increasing the responsiveness of it knowing that someone is returning home or leaving. Just want to try it out, so I’m asking if anyone knows how to change the zone radius in an automation.

http://mywiki.wooledge.org/XyProblem

This is an XY problem.

My post wasn’t aggressive, I was trying to find out what you were trying to achieve so I could help you. You cannot do what you’re trying to do because you cannot set the radius values from one minute to the next, so the only way anybody can help you is to know what you’re trying to achieve.

@dj21d has given you 2 solutions to this already, in fact he gave you the best solution in his first reply.

2 Likes

ok thanks.

I’ve noticed around here that if someone posts here and is new or doesn’t know a lot about doing things with home assistant, that others tend to respond condescendingly to them. In no way did your first response have a helpful tone. Maybe work on that.

From my experience after having done the same thing it’s always best to fully explain the situation in your original post. Most of the time people have a much easier solution. I think the tone from mf_social was because we had to decipher what your actual issue was…in order to help you. It wasn’t until your 6th post where you actually explained the problem you were having.

We all want to help each other here :slight_smile: That’s why we’re active on the forums.

I think you’re mistaking somebody who was trying to help, for somebody being condescending.

I don’t know why, I’ve reread my post and haven’t been rude in any way.

I’ve said please when I asked you for something, and pointed out that what you’re trying to do isn’t necessarily what you’re trying to achieve, and that actually what you’re trying to do can’t be done.

You’re going on like my reply was “You can’t, noob, go RTFM”, when in fact it was exactly the opposite.

Only here to help.

1 Like

Hey I wasn’t fully understanding the solution you were proposing with two zones, but it clicked for me. Do you just have two zones set up, one with a lower radius, one with a larger radius, active at the same time, and then trigger specific automations based on which zone you enter? For some reason I was thinking you were turning one off and the other on under certain circumstances. Anyway, I think what you are doing would definitely work for what I’m trying to do. Only thing I’m not sure about is factoring in two zones into a bayesian sensor. Do you use bayesian?

Yup, the 2 zones are always running.
My home zone uses the default radius where as the home_radius zone has a radius of 1km.

I use the zone.enter automation for my home radius to set the heat for my house. Then use the device state change to set my lights.

Unfortunately I do not use and have no experience with bayesian sensors. I might take a look into them though because they seem neat. I’m only using “GPS Logger” on my android phone for presence detection as well as my Meraki router. I have not noticed any glaring issues with this setup.