How To Display Person State As “Away” Rather Than “not_home” In Apple Watch Complication

I have a complication set up for my Apple Watch that is meant to display if person.NAME is Home, Away, or in any named zone. Unfortunately, how it currently works in actuality is that it displays either Home, any named zone, or not_home. How do I change this displayed state of not_home to a displayed state of Away?

The code I currently have for my complication is:


{{ states("person.NAME") }}

Thank you so much!

Translate works only in the frontend, you can use the template for your own translation… like this…

{% set personState = states("person.NAME") %}
{% if personState == 'not_home' %}
  Away
{% else %} 
  {{ personState }} 
{% endif %}

Thank you, @VietNgoc! That is super helpful. Until reading your reply, I had not yet heard of or dealt with templates in Home Assistant. I appreciate you bringing them to my attention.

Now I’ve created a sensor template helper in the Helpers section of my Configuration menu using the code you shared above:

Additionally, I’ve changed the code in my Apple Watch complication from:

{{ states("person.emily") }}

to:

{{ states("sensor.emily_location") }}

Of course, right now the person is in a named zone and not in a not_home or Away state. This means that I cannot yet confirm that this translation is displaying correctly within the Apple Watch complication. But I’ll come back with an update and mark this topic as being solved once I can confirm that everything works.

Thanks again!

EDIT:
It worked!