dwains-lovelace-dashboard icon indicating copy to clipboard operation
dwains-lovelace-dashboard copied to clipboard

Allow location customization for Persons

Open michaelmior opened this issue 2 years ago • 2 comments

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 %}

michaelmior avatar Apr 21 '22 17:04 michaelmior

DD just shows the state of the person so you can do this in HA it self?

dwainscheeren avatar Apr 29 '22 11:04 dwainscheeren

@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.

michaelmior avatar Apr 29 '22 16:04 michaelmior