automation:
  - alias: Bedroom · Bedside Switch
    use_blueprint:
      path: aqara_switch.yaml
      input:
        action_entity: sensor.bedside_switch_action
        click:
          - service: light.toggle
            data_template:
              entity_id: >-
                {% if is_state('input_select.bedroom_mode', 'day') %}
                  light.master_bedroom_main
                {% else %}
                  light.bedside
                {% endif %}
              brightness_pct: 100

        double_click:
          - service: light.toggle
            entity_id: light.bedside

        hold:
          - service: script.toggle_bedroom_mode
