{%- if found %}
🏠 <b>{{ friendly_name }}</b>
<code>{{ entity_id }}</code>
State: <b>{{ state }}</b>{% if unit_of_measurement %} {{ unit_of_measurement }}{% endif %}
{%- if device_class %}
Class: <i>{{ device_class }}</i>
{%- endif %}
{%- if last_changed %}
Last changed: <i>{{ last_changed }}</i>
{%- endif %}
{%- if attributes %}

<b>Attributes</b>
{%- for key, value in attributes.items() %}
• {{ key }}: <code>{{ (value if value is string else value | tojson) | string | truncate(120) }}</code>
{%- endfor %}
{%- if hidden_attr_count and hidden_attr_count > 0 %}
<i>… and {{ hidden_attr_count }} more attribute(s) hidden (sensitive or truncated for length)</i>
{%- endif %}
{%- endif %}
{%- elif reason == 'missing_arg' %}
Usage: <code>/state &lt;entity_id&gt;</code>
{%- elif reason == 'not_found' %}
Entity <code>{{ entity_id }}</code> not found.
{%- else %}
Could not load state for <code>{{ entity_id }}</code>: {{ error }}
{%- endif %}
