I would like to show on a card a “House Status” which can be “Home” or “Away” - just like the device trackers does. I have currently used a “input_select” method, but that looks different aesthetically than the device trackers as it gives me the option (logically enough) to choose “Home” or “Away” from a drop down menu instead of just showing the text.
I am intending the house status to be based on two device trackers so I don’t need to be able to use the drop down.
Not sure, but this is my solution. I have a Presence card showing two device trackers as Home or Away. It also contains a boolean switch called Guest, in case the babysitter is present. There is also a boolean called someone_present that is triggered when at least one of the 3 mentioned is on. I do not show this last boolean in the card, it is implicit. Only use it in automations.
That is also more or less the setup I have, I would just like to have another option with the home/away indicator. But I haven’t found a way for it, so I might just change it to a input boolean with “Away” and then on/off.
Similar to what @phileep says, there is already an automatically maintained group for device_tracker’s named group.all_devices, so you don’t even have to create one. It’s state will be home if one or more of the device_tracker’s are home, and not_home if all the device_tracker’s are not home. But, like all automatically created groups, by default it is hidden. You just need to use customization to un-hide it.
BTW, the actual states of device_tracker’s and group.all_devices is home and not_home, even though they display as Home and Away. And, even though device_trackers can take on other states, group.all_devices will always only be home/Home or not_home/Away.
EDIT: Actually, group.all_devices doesn’t show like a sensor, it actually shows all the individual device_trackers. I’m using it in my frontend and just reminded myself what it looks like!
So, although its state is what you want, it doesn’t display the way you want. Therefore, do like @Emphyrio mentions. I.e., create a template sensor. Actually, a Template Binary Sensor is probably best:
Here is what I’m using. It will check the device track of phone first (unifi) and if Unifi thinks I’m not home then my GPS will be checked. I didn’t like how ‘home’ was in lower case so I made another template for the front end
Thanks for all the replies - I will work with those inputs. The reason for I cannot use the standard group.all_devices is because it is not all devices that I can use in this home / away indicator. We have an ipad etc. that is also in the group.all_devices and that one never leaves home.
Group works just fine for me … I assume this is what you are after:
From a simple group.
Because the first item in the group is a device tracker, the status of the group is the same as a device tracker . ie home / away … but if you want to get complicated, knock yourself out!!