Customize home/not home

Can I change the displayed strings for home/not home?

I am fine with those values being used for triggers etc, but I would like to be able to translate the values in the gui if possible.

I think the below link will give you what you are looking for.

Thanks for the suggestion. You are correct in that I can fix the text in that way, but using a template sensor doesn’t let me use a picture as icon, and the portrait is more important than the home-text to me.

why not just use the “entity_picture” function under customize?

1 Like

https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/sensor/devices_states.yaml

Ooh, I had totally missed that one. I tried using picture: to customize it, like the field you can set in the know_devices.yaml file! No wonder it didn’t work.

A template sensor with entity_picture will work fine for this, thanks! :smiley:

For anyone interested, this is the sensor config I ended up with:

- platform: template
  sensors:
    presence_chrio:
      value_template: '{% if is_state("device_tracker.chrio_mobil", "home") %} Hemma {% elif is_state("device_tracker.chrio_mobil", "not_home") %} Ute {% else %} {{ states.device_tracker.chrio_mobil.state }} {% endif %}'

This maps home->Hemma and not_home->Ute. Any other value (zone names) stays the same.

And the customize part that sets name and icon (icon image is stored in .homeassistant/www/):

sensor.presence_chrio:
  friendly_name: Chrio
  entity_picture: /local/icon_chrio.jpg
1 Like