Skip to content

Instantly share code, notes, and snippets.

@vidvisionify
Created January 12, 2019 09:41
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 vidvisionify/4f62b3183c69bd2a8bdad6a5b887eb03 to your computer and use it in GitHub Desktop.
Save vidvisionify/4f62b3183c69bd2a8bdad6a5b887eb03 to your computer and use it in GitHub Desktop.
input_boolean:
movie_mode:
name: Movie Mode
initial: off
icon: mdi:movie
automation:
- alias: Movie Mode
trigger:
platform: state
entity_id: "input_boolean.movie_mode"
action:
service: scene.turn_on
data_template:
entity_id: >
{% if is_state("input_boolean.movie_mode","off") %}
scene.hello
{% elif is_state("input_boolean.movie_mode","on") %}
scene.movie
{% endif %}
script:
echo_button_movie:
alias: 'Echo Button - Movie'
sequence:
- service: input_boolean.toggle
data:
entity_id: "input_boolean.movie_mode"
homeassistant:
customize:
script.echo_button_movie:
icon: mdi:hockey-puck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment