The way I’m imagining this working is in the /config/person menu, you can click to edit a person and it brings up the normal menu it already does, but there’s another tab where you can specify templates to act as attributes for the person.
Being able to combine all these sensors from other integrations to my person would make me very happy
That only allows for static attributes though, right? Not other sensors?
What I want as an attribute is their statuses across various other integrations. So like I’d want something like…
homeassistant:
customize:
person.me:
- key_location: [the state of the device_tracker.my_keys]
- xbox_status: [the state of my sesor.me_xbox_status]
That way I can just drop a person card on my lovelace, click into it, and easily see all the different values that are important to me about that person.
I’m working on something that whould show someone “gaming status” (Steam and Xbox).
And I have to do many things into the javascript card code to parse and merge different sensors data.
I would also like this ability, adding things like:
Work_Status: Standard/Vacation/On-Call
Home_Status: Resident/Guest/Privileged_Guest/Overnight_Guest
Voice_Status: LiveMic/Muted/Offline
These attributes could be templated or just changed via an API/Service call.
Would be nice for some automations, information displays and for usage within messaging services. Some of this could be worked through by adding some things to the new calendar, but some of it would be difficult.
do you have a better option? I appreciate the advise so everyone can reset the state via automation, but is there something you know about how to do this better?
It’s advice with a significant drawback; the value that’s set is temporary.
Generally speaking, a sensor entity in Home Assistant is read-only. That’s why there’s typically no service call to set a sensor’s state. The sensor’s underlying integration has exclusive control of the sensor’s value.
If you need a sensor entity whose state value you can set permanently (i.e. the value survives a restart), consider using a Trigger-based Template Sensor. The Template integration gives you complete control over the behavior of a Template entity.
One solution that I starting using for this was helpers, and then on-boot automation to write the appropriate data over to the person entity. This worked well when I had only a couple people and a couple attributes, but it’s ballooned way out of control, and is completely unmanageable.
For the past few years, I’ve been trying to come up with an effective way to manage people better in Home Assistant, and over that time, I’ve come across multiple half-measures, but nothing very solid to say the least.
My new in-development approach is to use AppDaemon and a couple helper text fields. All the attributes are stored in a custom sensor entity (person_attribute.store), and on start, AD applies those attributes to the people. To edit the attributes, I use the helpers to select Person Entity, Attribute name, and value, and then AppDaemon grabs those values and applies them to the person and the attribute store.
I’m about halfway done with writing it all up, so hopefully it works.
Instead, if Home Assistant would just make this easier for me, I’d like it so much better!