Hello,
I am typing to edit the location display names showing in ESPresense.
Currently, if I am detected in my Master Bedroom, it displays my location as “master_bedroom”. I would like to edit this to display “Master Bedroom”.
I tried adding the following Platform Template in my Sensors YAML file
- platform: template
sensors:
leon_iphone_ble:
value_template: >-
{% if is_state('sensor.leon_iphone_ble', 'entryway') %}
Entryway
{% elif is_state('sensor.leon_iphone_ble', 'kitchen') %}
Kitchen
{% elif is_state('sensor.leon_iphone_ble', 'lLiving_room') %}
Living Room
{% elif is_state('sensor.leon_iphone_ble', 'master_bedroom') %}
Master Bedroom
{% elif is_state('sensor.leon_iphone_ble', 'guest_bedroom') %}
Guest Bedroom
{% elif is_state('sensor.leon_iphone_ble', 'office') %}
Office
{% elif is_state('sensor.leon_iphone_ble', 'not_home') %}
Not Home
{% else %}
Unknown
{% endif %}`
Something is not right with the YAML Developers Tools is not showing errors though.
When installed, it only shows my location as “Unknown”, the only line of code working.
When I remove the YAML, my location goes back to displaying “master_bedroom” or “guest_bedroom”.
I think I’m very close, but I am not seeing my mistake.
Any help would be greatly appreciated.
Thank you.