This is what I’m trying to get work but for some reason it just keeps telling me ‘unavailable’…so apparently I’m not doing something right… can anyone see anything obvious I’m missing here…
Thank you!
- platform: template
sensors:
john_presence:
friendly_name: John presence
value_template: >-
{% set home_state = device_tracker.sm_f926u1.state %}
{% if home_state == 'home' %}
John is in
{% else %}
John is out
{% endif %}
icon_template: >-
{% if is_state('device_tracker.sm_f926u1', 'home') %}
mdi:human-male
{% else %}
mdi:human-cane
{% endif %}