I’m new to the HA business and i can’t wrap my haed around an issue. hope anyone of you can help!
i have a ventilation automation that goes on low when we are not home. (defined 2 fixed device_trackers)
Now i want to add switches (based on device_trackers) so i can control who can trigger the ventilation automation. (for example when we have a babysitter, house cleaning,…)
when running this in the template editor it comes out great
Unfortunately, I don’t think there’s currently an easy way to completely automate this. Maybe if you kept all guests’ devices on a specific network you could use a template sensor to combine that with your regular family members’ presence to get a dynamic house occupancy sensor.
With updates to person entities and zones over the past couple years, the legacy group presence method isn’t the only, or best, method to use. The state of a zone reflects the number of person entities that are in that zone, so you can use a basic Numeric state trigger instead. It would still require some manual maintenance in the UI, but you could set up a Guest person entity and just add all your guests’ device trackers to a single person. Your trigger would then look like:
- platform: numeric_state
entity_id: zone.home
below: 1
id: Empty house
- platform: numeric_state
entity_id: zone.home
above: 0
id: Full house
In Home Assistant, configuration consists mostly of key-value pairs. Where supported (as indicated in the documentation by a red “template” as the accepted data type), Jinja templates can be used to provide the values, but not the keys.
If I’m reading this right and understanding what you’re trying to do, you want to use device trackers to figure out if there are guests present so that you can prevent (or trigger) certain automations such as shutting down HVAC and similar, do I have that right?
If so, my next question is - do you have a dedicated guest wifi network that guests connect to? If you do, you could create a sensor to query the device trackers for that ssid and create a binary sensor that would show if there are guests present and use that as a condition in your automations.
Let me know if you’d like more info, my next video will actually be on this very topic. Copy is already written & tech bits recorded, planning to shoot the talking head bits tomorrow.
Hi all, thanks for thinking with me. unfortunatly i don’t use a guestnetwork but it’s a good thing to keep in mind. as it is clear to me that making the list, the way i want, is not that common + i don’t have that many guests that will be in house without any of us being there also i’ll stick (for now) hard coding the guest into a group.
Rather than trying to hard-code the guest into the group, why not just put a toggle on the dashboard that allows you to manually enable/disable guest mode?
Also, here’s the guest-mode video I mentioned above. Apologies for not coming back earlier to provide this.