blueprint: name: Motion Light Tutorial description: Turn a light on based on detected motion domain: automation input: button1: button2: button3: button4: button1_short_press: triggers: - trigger: state entity_id: - !input button1 attribute: event_type to: - short_release - long_press - repeat - trigger: state entity_id: - !input button2 attribute: event_type to: - short_release - long_press - repeat - trigger: state entity_id: - !input button3 attribute: event_type to: - short_release - long_press - repeat - trigger: state entity_id: - !input button4 attribute: event_type to: - short_release - long_press - repeat conditions: [] actions: - choose: - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_1" and trigger.to_state.attributes.event_type == "short_release"}} sequence: [!input button1_short_press] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_1" and trigger.to_state.attributes.event_type == "long_press"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_1" and trigger.to_state.attributes.event_type == "repeat"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_2" and trigger.to_state.attributes.event_type == "short_release"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_2" and trigger.to_state.attributes.event_type == "long_press"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_2" and trigger.to_state.attributes.event_type == "repeat"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_3" and trigger.to_state.attributes.event_type == "short_release"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_3" and trigger.to_state.attributes.event_type == "long_press"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_3" and trigger.to_state.attributes.event_type == "repeat"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_4" and trigger.to_state.attributes.event_type == "short_release"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_4" and trigger.to_state.attributes.event_type == "long_press"}} sequence: [] - conditions: - condition: template value_template: >- {{ trigger.entity_id == "event.bedroom_switch_desk_button_4" and trigger.to_state.attributes.event_type == "repeat"}} sequence: [] mode: single