followed some instructions here to get MS Teams status to report in HA.
It works great, I can now see the status in HA on my dashboard (as per the instructions on the page in the link above),
Next I’d like to create a light (via Hue) to reflect the status shown on my dashboard.
The integration uses input_select with the states (options)
options:
Available
Presenting
In A Call
In A Meeting
Busy
Away
Be Right Back
Do Not Disturb
Idle
Offline
‘Off’
In A Conference Call
When I try to create an automation, using the input_select entity ID and a trigger state, i use attribute (options), then say from available to busy the condition, then I action the device (Hue Light) even simply turning it off does not work.
How do I connect the existing state of Teams presence to flip on a light (or change the colour of it)?
Thank you very much! I’m amazed at how easy that was and how well it works!
Would it be possible to make this only run during certain times? For example at night time I want the light just to be a normal night light but during working hours it can be that team status light
The conditions in an automation allow you to specify when (and by implication - when not) to execute the automation. So put in a condition to test for the time, and if needed create another automation for the night.
I was able to specify a condition with time in the automation upfront (i.e. before the choose actions commands) of the automation. I then created a second automation for the night light control of the same light.
Here’s what I did:
Automation 1. I set the time condition for after 6 am to before 6 pm (mon to saturday) for the Teams Status to work on the Hue Go light. So, anything outside of that time, the light will not change colour based on status (I tested this and it works).
Automation 2. For the second automation i.e. make the Hue Go light a normal/night light, I created two time conditions (in the same automation) for after 6pm and before 6 am (mon to friday) and allday say and sun
Just some observations/questions:
I noticed that once 6 am hits on a work-day, the light still remains at the last state (i.e. night-light state colour), and it isn’t untill the teams status has changed that the light will turn to status colour. Not an issue at all, but, would it easy for the automation to get the status the moment 6 am hits? Its not a big deal if it not possible or easy.
For the second automation (i.e. normal/night light). How do I specify 24 hrs on the weekend days (i.e. Sat, Sun)? Right now I’ve set the “before” and “after” times to the same time 12:00:00 am. I don’t know if this means all day…I suspect I have to change it to only “after” 12:00:00 am for Sat, Sun.
Would it be possible, using trigger IDs and get rid of the second automation entirely? That way I can create only 1 automation (i.e. the first one), so that it can do both make the Hue Go light a Teams status light from Mon-Fri 6am to 6 pm, and every other time its a normal/night light at a different set colour?
This is easily fixed by using the start time as a a tigger too for the automations.
Short answer is - not. Leave the times empty and the test will only use the weekday.
condition: time
weekday:
- sat
- sun
Yes, but it would make the choice more complex, it is a matter of taste, but I would keep it separate. If you wanna torture yourself and HA you could combine all automations into one huge mess :-