Skip to content

Instantly share code, notes, and snippets.

@michimau
Last active May 3, 2026 16:24
Show Gist options
  • Select an option

  • Save michimau/0e9c3fd6b4c2dd38b9e6a17ae0440c69 to your computer and use it in GitHub Desktop.

Select an option

Save michimau/0e9c3fd6b4c2dd38b9e6a17ae0440c69 to your computer and use it in GitHub Desktop.
home assistant combined status template widget
<b>Alarm:</b>
<br>
{% if is_state('select.smart_security_gateway_home_alarm_system', 'Armed') %}
<font color="#ff4444">
<b>Armed</b>
</font>
{% elif is_state('select.smart_security_gateway_home_alarm_system', 'Disarmed') %}
<font color="#44ff44">
<b>Off</b>
</font>
{% else %}
<font color="#ffa500">
<b>{{ states('select.smart_security_gateway_home_alarm_system') }}</b>
</font>
{% endif %}
<br>
{{ (states.select.smart_security_gateway_home_alarm_system.last_changed|as_local).strftime('%H:%M') }}
<br>
<br>
<b>Garage:</b>
<br>
{% if is_state('binary_sensor.sonoff_garage_sensor', 'off') %}
<font color="#ff4444">
<b>Closed</b>
</font>
{% elif is_state('binary_sensor.sonoff_garage_sensor', 'on') %}
<font color="#44ff44">
<b>Open</b>
</font>
{% else %}
<font color="#ffa500"> <b>{{ state('binary_sensor.sonoff_garage_sensor') }}</b>
</font>
{% endif %}
<br>{{ (states.binary_sensor.sonoff_garage_sensor.last_changed|as_local).strftime('%H:%M') }}
<br>
<br>
<b>Gate:</b>
<br>
{{ (states.switch.shelly_interruttore_cancello.last_changed|as_local).strftime('%H:%M') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment