Closed xeor closed 2 years ago
In the home-assistant UI, you can set a list of device trackers on a person. Those seams to be, based on what I can find in https://github.com/home-assistant/core/blob/dev/homeassistant/components/person/__init__.py#L401-L414 not available normally.. But they are still there in the code refeered by device_trackers on a person.
device_trackers
How can I get to that list on a person using pyscript. I have looked around, anI d I think I need to use the hass object to get to some raw configuration about the person, but unsure how that object is structured.
person
hass
In []: state.getattr('person.lars_solberg').keys() Out[]: dict_keys(['editable', 'id', 'latitude', 'longitude', 'gps_accuracy', 'source', 'user_id', 'friendly_name'])
I imagine this is also the case for other integrations, so it would be very nice with this documented a little, at least in this little issue :)
Found this information @ hass.data['person'][1].data['lars_solberg']['device_trackers' :)
hass.data['person'][1].data['lars_solberg']['device_trackers'
In the home-assistant UI, you can set a list of device trackers on a person. Those seams to be, based on what I can find in https://github.com/home-assistant/core/blob/dev/homeassistant/components/person/__init__.py#L401-L414 not available normally.. But they are still there in the code refeered by
device_trackers
on a person.How can I get to that list on a
person
using pyscript. I have looked around, anI d I think I need to use thehass
object to get to some raw configuration about theperson
, but unsure how that object is structured.I imagine this is also the case for other integrations, so it would be very nice with this documented a little, at least in this little issue :)