geoffreylagaisse / Hass-Microsoft-Graph

Microsoft Graph API Presence Integration for Home Assistant
29 stars 3 forks source link
custom graphapi home-assistant integration

Home Assistant Custom Components

hacs_badge made-with-python Discord

Custom Component for Home Assistant.

Microsoft Graph API Component

Component to interface with Microsoft's Graph API on your organization's tenant. Currently only detects the authorized user's Microsoft Teams availability and activity but the possibilities are almost endless.

The Microsoft Graph integration allows Home Assistant to create sensors from various properties of your Office 365 tenant via Microsoft's Graph API. All queries are performed using the authenticated user's account and depend on the permissions granted when creating the Azure AD application.

Home Assistant authenticates with Microsoft through OAuth2. Set up your credentials by completing the steps in Manual Configuration and then add the integration in Configuration -> Integrations -> Microsoft Graph. Ensure you log in using a Microsoft account that belongs to your organization's tenant.

Installation

Manual Configuration

You will need to register an application in Azure AD and retrieve the client ID and client secret:

MS Azure account set up

Home Assistant Setup

Sensor

The Microsoft Graph sensor platform automatically tracks various resources from your Office 365 tenant.

Microsoft Teams

There are 2 sensors that are added, both of which are enabled by default.

Entity ID Default Description
sensor.ms_teams_availability Enabled Shows your availability (e.g. Available, AvailableIdle, Away).
sensor.ms_teams_activity Enabled Shows your activity (e.g. InACall, InAConferenceCall, Inactive, InAMeeting).

See possible availability and activity values here.