First post from me. I’ve been using HA for a couple of weeks, and hit some major walls (and solved them). But I finally hit a wall that I can’t break…
I’ve set up presence detection using Owntracks, and it’s working flawlessly. I’m using iBeacons to locate the room in the house, and unfortunately this breaks the ‘home’ vs ‘not home’ in group.all_devices since a device can be in the living room for example. Obviously HA will think that’s not home.
My question: how can I set a value to group.all_devices where ‘home’ is considered ‘home’, ‘living’ or ‘hall’.
Instead of using group.all_devices you could use a template sensor and have logic to set it how you want it based on beacons and owntracks, then use your sensor in automations.
I’ve been looking at templates, but I can’t phantom the concept…
When is a template “called”? I would like to have a template evaluate whenever a device changes mode (home -> not home or not home -> living), but I don’t know how to configure this…
And then you just call the name of the sensor template instead of the sensor itself.
For example, I am using NMap to track some computers, printers and devices in my office. But it doesn’t make sense to read a computer is "home’ or "not_home’ - WTH? where did it go? - so I modify the output to something that makes sense to me. Then instead of showing the device sensor, I show the template sensor in my group and I get the output I want.
For this one device I have now 2 icons in the home page, one for the device tracker with the friendly name I defined for it and the second one for the sensor with the sensor name only.
What additional configuration am I missing that is causing the duplication as well as the sensor not using the friendly name?