renemarc/home-assistant-config

View on GitHub
automations/scene_select.yaml

Summary

Maintainability
Test Coverage
#
# Manually select a global scene
#
# @subscribe input_select.scene
#
# @see /scripts/
#
- id: scene_select
  alias: "Scene SELECT"

  trigger:
    # When a scene has been selected.
    - platform: state
      entity_id: input_select.scene

  action:
    # Activate the global scene script.
    - service: script.turn_on
      data_template:
        entity_id: >-
          script.scene_{{ states('input_select.scene')|lower }}