Skip to content

Instantly share code, notes, and snippets.

@samplec0de
Created March 8, 2023 17:53
Show Gist options
  • Select an option

  • Save samplec0de/a08c9ff9320908180769478686ca29f5 to your computer and use it in GitHub Desktop.

Select an option

Save samplec0de/a08c9ff9320908180769478686ca29f5 to your computer and use it in GitHub Desktop.

Revisions

  1. samplec0de created this gist Mar 8, 2023.
    10 changes: 10 additions & 0 deletions value_template.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    value_template: >-
    {% set andrey_id = states.person.admin.attributes.user_id
    %}
    {% set nastya_id = states.person.nastya.attributes.user_id
    %}
    {% set who_stopped_id =
    states.input_button.alarm_stopped.context.user_id %}
    {% set andrey_stopped = who_stopped_id == andrey_id %}
    {{ andrey_stopped }}