Skip to content

Instantly share code, notes, and snippets.

@bessarabov
Created October 12, 2020 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bessarabov/d425dbad940e39aef1a00f9dbd00be40 to your computer and use it in GitHub Desktop.
Save bessarabov/d425dbad940e39aef1a00f9dbd00be40 to your computer and use it in GitHub Desktop.
input_boolean:
one:
input_text:
status:
automation:
trigger:
platform: state
entity_id: input_boolean.one
to: "on"
action:
service: input_text.set_value
data:
entity_id: input_text.status
value: >
{% if states('input_text.status') == "теплый" %}
холодный
{% elif states('input_text.status') == "холодный" %}
теплый+холодный
{% elif states('input_text.status') == "теплый+холодный" %}
теплый
{% else %}
теплый
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment