#Is Group with a zone?

38 messages · Page 1 of 1 (latest)

dire loom
#

I've got a group, that is made up of my mobile devices with HA installed on it. I've got areas setup like home for instance, but I also have a zone that encompasses my home called "Keep House Warm"

The idea behind this that I want to create an automation that basically says "If all the devices within the group are in the zone Keep House Warm, do not set heating to away mode"

Does anyone know how I can achieve this? I can't see anything obvious

past dock
#

probably going to need to write a fairly complex template condition

#

the group attributes list the individual members

#

you can iterate those and check their zone (either home or the larger zone)

dire loom
#

well, the group lists the closest one to home doesn't it?

#

im not actually sure why 2 are unknown, but Home seems to take priority

past dock
#

I'm not sure what you mean "the closest one to home" ?

dire loom
#

so i have "Home" which is a zone of like 20m around my house

#

and then "Keep Warm" is a zone of like 2000m around my house

#

now if i leave "Home" I suspect my device would then show "Keep Warm"

calm folio
#

I'd use the Proximity integration instead of a secondary zone for this. Then it's a simple template of if all devices are within x of home zone, set keep warm = true.

solemn wraithBOT
dire loom
#

ahh nice ty

calm folio
#

Yup 🙂

dire loom
#

i need to figure out why the Pixel 7 says Unknwon

#

app seems fine :/

calm folio
#

Not sure on that one... haven't touched an Android device in a long, long time.

dire loom
#

hmmm. proximity says im 255 meters away from the zone

#

even though in HA the zone is 2000m around my house lol

calm folio
#

Don't use the big zone, just use your home zone.

dire loom
#

wont let me go more than 200m or something

#

cant get 2000m

calm folio
#

Ah, no, I'm not explaining well.

dire loom
#

oh i think i misread

#

i can use home, and it'll tell me how far i am away and which way im going

calm folio
#

Create the proximity integration on your home zone. Then, use sensor.smart_home_nearest_device (or sensor.smart_home_nearest_distance) as your calculation.

#

There is another solution where you can create a simple binary sensor template helper with your big home zone as well: '{{ states('zone.big_home_zone') | int(0) == [number of people in your house] }}`. BUT... having proximity setup opens you up to a lot more possibilities (imho). I have one automation that if I'm more than 500 miles from home, it automatically turn on my alarm to vacation mode.

past dock
#

people at Home are not counted in big_home_zone's state counter

#

overlapping zones is weird :\

calm folio
#

TBH, I've never tested it, but now I'm curious. And yeah, zones in general get weird. lol

past dock
#

you could maybe add the count of home and big_home, but that only works if every person in the house is in the original group

calm folio
#

And this is why I suggested Proxmity. One of my favorite integrations for stuff like this without complicating zones.

dire loom
#

Right, fixed the device location

#

needs the location sensor itself on as wel

calm folio
#

So, working better than big zone?

dire loom
#

yep!

#

worked great!