Joel Hawksley / joel@hawksley.org / ←home

Home Assistant video call status light

TL;DR: Use the Home Assistant MacOS app to control smart lights based on video call status.

I often wear noise cancelling headphones to help me focus, but they make it difficult to hear a knock on the door. I’m also in meetings quite a bit, when a door knock is less welcome. While I try to keep my calendar up to date so my wife knows when I’m on a call, I’ll occasionally have ad-hoc conversations for pairing, etc.

I recently set up a system to indicate whether I am listening to music or on a video call, using Zigbee night lights from Third Reality, one in the hallway and another in my office so I can know what the hallway light is set to.

In Home Assistant, I created a helper called Office audio state using sensor data from the Home Assistant app running on my personal and work laptops. It returns input, output, or off (be sure to replace the sensor names with yours):

{% if states("binary_sensor.joelhawksley_audio_input_in_use") == "on" or states("binary_sensor.joel_audio_input_in_use") == "on" %}
input
{% elif states("binary_sensor.joelhawksley_audio_output_in_use") == "on" or states("binary_sensor.joel_audio_output_in_use") == "on" %}
output
{% else %}
off
{% endif %}

I then have an automation listening to changes to the helper (debounced for 5 seconds to avoid false triggers from momentary changes) and switching between scenes on the lights (blue for video call, yellow for listening, off otherwise):

alias: OFFICE Hallway nightlight audio input indication
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.office_audio_state
    for:
      hours: 0
      minutes: 0
      seconds: 5
conditions: []
actions:
  - if:
      - condition: state
        entity_id: sensor.joelhawksley_audio_state
        state:
          - input
    then:
      - action: scene.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: scene.upstairs_hallway_night_light_blue
    else:
      - if:
          - condition: state
            entity_id: sensor.joelhawksley_audio_state
            state:
              - output
        then:
          - action: scene.turn_on
            metadata: {}
            data: {}
            target:
              entity_id: scene.upstairs_hallway_night_light_yellow
        else:
          - type: turn_off
            entity_id: 068da57
            domain: light
          - type: turn_off
            entity_id: 46e8791
            domain: light
mode: single

As a bonus, the night lights also serve as Zigbee routers, extending the range and stability of our Zigbee network!