Focus Mode In Your Study – Lights And Music ($20)

  • The best way to increases productivity is to avoiding distractions
  • This automation will help you to quicke get into a work mode and let others know that you are busy
  • Skills needed: Medium – this one require a moderate ability to set conditions and actions
  • Costs: Meduim- we suggest to have the sensors at each location where the leakage can occur; Shut off valve is also usually not cheap
Can you impove this automation? This is not for profit attempt to give back to smart home community all the fun we were having with automation. Please add your comments, ideas improvemetns so we can share it with everybody.

How does it work?

  • You need a way to understand when you need to go to study mode – is it just time, or also motion as well
  • Once defined, you can get into the right lightning, music and avoid distructions


  • At the start of the work day


  • You entered the study
  • Your work computer is on
  • Your zoom is on


  • Switches on a light in the focus mode
  • Starts playing the “Productivity” playlist on Spotify
  • Put your mobile on the “flight” mode
  • Switch off the internet from your mobile

What do you need?

This automation will require motion sensor, smart light and may be the smart audio system

  • Motion Sensor - This sensor detects any motion and ideally combined with luminance sensor. Our advice is to go for Zigbee (Matter) and battery operated. Eve Motion Sensor (Matter) ($44.82) is our top chose as supports Matter (future proof), has luminance sensor and good battery life. If you want to go fancy, Linptech mmWave human body sensor ($35.99) would work, but you will need to sort out wired power supply
  • Smart Color Lights / Bulbs - Allows you to not only remotely switch on and off, but also change the color and temperature of the light. Sengled Zigbee Smart Light Bulbs (Price not available) is our advice due to great quality and good selection of bases and bulb types. You can also check out Kasa Smart Light Bulbs ($28.45) if you prefer wifi version.

Advance Uses / Ideas to customise

  • You can add a motion sensor that triggers the study mode at certain times
  • You can enable special lights in your home that notifies your family that you are in a focus mode
What is the Automation Hub? This routine is part of the Automation Hub, largest a community-driven list of over 200 practical automation ideas for your smart home. Read more about Smart Home Automation Hub or search ideas by room, by device or by use case. Also, have a look at best home automation ideas as voted by our users.

Generic Step-by-Step Setup Guide

  1. Connect all the devices to your hub.
  2. Select the actions you would want to take
  3. Create an automation routine that triggers the action valve when you are in the room or the time is up
  4. Test the workflow

How-to focus mode automation in Home Assistant?

Once you are done with setting up with your devices, follow the steps below.

Total Cost:



Things Needed?

Motion Sensor and Lights

Steps to configure automation to prevents leaks in Home Assistant?

Step 1

Copy the YAML code above.

Step 2

Paste it into your automations.yaml file in Home Assistant.

Step 3

Save the file and reload automations from the Home Assistant UI.

Add the

  - alias: "Focus Mode Automation"
      platform: state
      entity_id: binary_sensor.motion_sensor_office
      to: "on"
      - service: scene.turn_on
        entity_id: scene.focus_mode
      - service: media_player.select_source
        entity_id: media_player.spotify_player
          source: "Your Spotify Playlist Name Here"
      - service: media_player.media_play
        entity_id: media_player.spotify_player


  • Trigger: This automation is triggered when binary_sensor.motion_sensor_office detects motion (state changes to “on”).
  • Action 1: The first action turns on a scene called focus_mode which you should pre-configure to set the lights as you want them.
  • Action 2: The second action selects the source (your Spotify playlist) for media_player.spotify_player.
  • Action 3: The third action starts playing the selected Spotify playlist.

Remember to replace "Your Spotify Playlist Name Here" with the name of the actual Spotify playlist you want to start playing.


Last update on 2024-07-13 / Affiliate links / Images from Amazon Product Advertising API

Scroll to Top