automation:
  - alias: Living room · Desk switch
    use_blueprint:
      path: aqara_switch.yaml
      input:
        action_entity: sensor.desk_switch_action
        click:
          - service: light.toggle
            data_template:
              entity_id: light.living_room_main
              brightness_pct: "{{ is_state('sensor.house_mode', 'night') | iif(40, 100) }}"

        double_click:
          - service: light.toggle
            data_template:
              entity_id: light.living_room_ambient
              brightness_pct: "{{ is_state('sensor.house_mode', 'night') | iif(40, 100) }}"

        hold:
          - service: media_player.media_play_pause
            entity_id: media_player.living_room
