I forked a long standing, once working project by EBOOZ (https://github.com/EBOOZ/TeamsStatus) for monitoring Teams status. I have updated it to work with the *NEW* Teams and converted it over to Python. It’s not so much a fork, as copying some of his homework and moving it to a new language.

As mentioned in his repo, the latest version of MS Teams broke this long standing project some time during last year. If you moved over to the “new” teams, you’d lose HA integration. However, as of Jan 2024, MS finally updated the log files to allow for some alerting functionality again.

You can follow the thread about logs here (although no mention of updated functions):

https://learn.microsoft.com/en-us/answers/questions/1350627/logs-are-not-updated-in-new-teams-client-in-public?page=1&orderby=Helpful&comment=answer-1304232#newest-answer-comment

The log file has changed up somewhat since the original project and my work is still in progress. It is however functional.

My forked repo: https://github.com/uncannyowly/pyTeamsStatus

Current status is that the project: works- but it can take up to 1 minute to update status.

I’m using watchdog observer to monitor the file opposed to a loop, may swap back to loop though.

Open to suggestion and anyone who wants to work on it, go for it. 🙂

2 thoughts on “*NEW* Microsoft Teams Status Monitor for Home Assistant

  1. I found this very helpful and got it working with a couple of tweaks to your code.

    search_pattern_start = re.compile(r’NotifyCallActive’)
    search_pattern_end = re.compile(r’NotifyCallEnded’)

    I also changed it to read about 200 lines instead of 10. My Teams is generating too many logs to get back far enough between updates.
    lines = file.readlines()[-200:] # Read only the last 10 lines

  2. Thank you for creating this! I have been looking for a way to integrate a call status light that would work on my work computer (no admin rights) and this one I was able to implement. I am having some issues where the script seems to just stop reading the files after a minute (based on the log output in the command prompt window). When it is working, the status changes seem to update off and on and the teams activity has never come off of “not in a call”. Is this still fully working for you with the latest version of the new Teams? If there is a better contact method for questions, please let me know.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.