On Air light for work from home

Hi everyone,

After learning with this community Home Assistant and Node-Red, I’m very happy to share my first project. I will never be able to finish this project without the help of this forum. Thanks all!

Working from home is here to stay for a long while, like countless online meetings. As a result, my office door is almost always closed and I barely see my family, even if we are all present at the same time in the same house, because they never know if it’s ok to step inside.

So I have created an “On Air” Light to notify outside of my office the current status with RGB light. The hardware part was very cheap and easy to do. I learned electrical installation during my last home renovation with my handy-man. I’m living in Canada, so your electrical code may be different in your country.

WARNING! If you are not comfortable with electricity, use a professional electrician.

By chance, I have a light switch on the other side of the wall. Only a short cable and no hole was needed, except for the Outlet Box.

For the software side, the Home Assistant Mac Companion gives me very useful sensors like FaceTime camera and micro. For the Mac presence in the room, I’m using my Mac Occupancy Template to know if my Mac is connected to the ethernet.

For more detail of my configuration, I invite you to check my Software and Hardware pages.

The “On Air” light is only turned on when someone is opening or closing the basement door or the motion sensor in the basement got triggered. The office is considered empty if the computer isn’t connected to ethernet and the office’s motion sensor is clear. Look forward to having a chair occupancy sensor :-). The light is turn off after 2 minutes if one of the sensors is trigger again.

The light changes color based on the status of the different sensors.

  • Green: the computer is connected to ethernet and not using this camera and micro
  • Red: the computer is connected to ethernet and the camera is used
  • Pink: the computer is connected to ethernet and micro is used
  • White: the office is empty and the basement’s illumination is below 150 lux

This white light helps move in the basement when the sun is down. The light turns white when my Mac goes to sleep or shutdown. So I have a light to exit my office without trigger a manual switch (who wants that? :-).

As for all my automation, I created an input boolean for turn off automation from HA, HomeKit, and Siri

Insert in the configuration.yaml

      name: On Air Automation
      icon: mdi:home-automation
      initial: true

The json file is on my GitHub:

Feel free to ask me any questions!


Good work, I really like your choice of light. It’s hard to find that fixture here in the US where you can use your own bulb.

1 Like


Yes, I agree! Sadly, many light fixtures have LED included :frowning:

Nice. I did something similar with an old On Air sign I got off ebay (top right corner). It’s only on/off, though.

1 Like

Very cool sign!

1 Like

Thanks for the inspiration here @lucas3d . I know this is old but wanted to share doing this on windows. For this you require HASS.Agent or the newer, actively maintained HASS.Agent 2 to create the sensors for your PC.

Once installed, create sensors in HASS.Agent for MicrophoneProcess, WebcamActive, and Audio.

Then create a binary sensor for “Meeting Active” as a helper to combine those sensors. I don’t mind being interrupted while I’m off video and off microphone, so I wanted my light to be on while a meeting program is active (so when I’m using my microphone for other reasons, it doesn’t turn on) and I’m either unmuted or on video.

I use this sensor to toggle my ON Air lightbox outside my room.

My “Meeting Active” sensor template looks like this:

{% set conference_app = states('sensor.pc_microphoneprocess') in ['MSTeams_8wekyb3d8bbwe', 'Zoom'] -%}
{% set webcam_on = is_state('binary_sensor.pc_webcamactive', 'on') -%}
{% set mic_on = is_state('sensor.pc_audio_default_input_device_muted', 'False') -%}
{% if conference_app and mic_on -%}True
{% elif conference_app and webcam_on -%}True
{% else %}False
{% endif %}

Zoom and Teams are listed as the active process for the sensor.pc_microphoneprocess sensor as soon as your join a meeting, whether or not you are muted, so I used that to grab whether I was currently on a call. This is likely the case for other conference apps, so you could just list whatever processes you use in the list ['MSTeams_8wekyb3d8bbwe', 'Zoom', 'Skype', 'Chrome', 'WhateverAppYouWant] to capture the appropriate applications for your use case.

I use the MuteMe button and app that syncs my system microphone status with my Teams and Zoom apps, so it changes the sensor.pc_audio_default_input_device_muted no matter where I toggle it.

To recreate the OPs different colours, you could instead create additional IF statements and conditions to capture your various modes (camera,microphone,empty, etc) and then use that to drive an automation to change an LED.

Hope someone finds this useful!

EDIT: For those who are on the new HASS.Agent 2, there has been a change to how the microphoneprocess sesnor works and the process using the microphone has been moved to an attribute of the sensor. For for the current beta (2.1.0-beta-1) you need to change the first line of the template sensor to:

{% set conference_app = (states.sensor.pc_microphoneprocess.attributes | list)[0] in ['MSTeams_8wekyb3d8bbwe', 'Zoom'] -%}

1 Like