Setting a room's availability based on computer activity

Hi,

I’m looking to set up a bulb that will change colour based on:

  • whether I’m in the office
  • whether I’m on the webcam on my (windows) computer
  • whether I’m on a call on my iPhone
  • whether I’ve set a DND mode switch on my streamdeck

Specifically, if I’m not in the office, I want the bulb to be off. If I’m in the office but on a call, then it should be red. If I’m in DND mode, then also red. If not, have it as yellow in work hours and green outside of work hours.

I figured that if I set up a helper as some sort of sensor, then I could change the colour of that bulb based on changes in that sensor. I could then set up a bunch of automations that change that sensor’s state.

My questions are:

  • Is there any existing solution for this?
  • How do I go about creating this sensor? As a text helper, a template sensor, a select template? If so what template do I define?

Do you have sensors for these already?