dwains-lovelace-dashboard
dwains-lovelace-dashboard copied to clipboard
Allow location customization for Persons
I would like to be able to show my geocoded location if my status is Away
instead of simply showing away. For example, I use the following template. This shows the city and country I am currently in instead of just Away
. It would be nice if it were possible to specify a template to use for the location.
{% if is_state('person.michael_mior', 'Away') %}
{{ state_attr('sensor.pixel_5_geocoded_location', 'locality') }}, {{ state_attr('sensor.pixel_5_geocoded_location', 'iso_country_code') }}
{% else %}
{{ states('person.michael_mior') }}
{% endif %}
DD just shows the state of the person so you can do this in HA it self?
@dwainscheeren How so? There's no such thing as a "template person" so I'm not sure how to create a person entity with a custom state. The HA person entities update automatically based on device tracker status and I want to keep the device tracker associated with each person.