Skip to content

Instantly share code, notes, and snippets.

@unixorn
Created November 11, 2022 14:08
Show Gist options
  • Save unixorn/4420effe2af0ae19dd921dd2fa9d02fb to your computer and use it in GitHub Desktop.
Save unixorn/4420effe2af0ae19dd921dd2fa9d02fb to your computer and use it in GitHub Desktop.
Home Assistant Template Example
garage_in_use:
friendly_name: "garage_in_use"
value_template: >-
{% if is_state('binary_sensor.garage_internal_motion01_occupancy', 'off') and is_state('cover.garagedoor','closed') %}
off
{% elif is_state('binary_sensor.garage_internal_motion01_occupancy', 'on') or is_state('cover.garagedoor','open') %}
on
{% else %}
{{ states('sensor.garage_in_use') }}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment