Closed pantherale0 closed 4 months ago
I would delete your token (which you will need to do anyway) and re-authenticate, since you will need to give HA the authority to send messages as well.
Thanks, just tried that, no luck:
This error originated from a custom integration.
Logger: custom_components.o365.coordinator
Source: helpers/update_coordinator.py:315
integration: Office 365 (documentation, issues)
First occurred: 13:52:12 (1 occurrences)
Last logged: 13:52:12
Unexpected error fetching O365 Sensors data: sequence item 0: expected str instance, NoneType found
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/o365/coordinator.py", line 230, in _async_update_data
await self._async_teams_chat_update(key)
File "/config/custom_components/o365/coordinator.py", line 280, in _async_teams_chat_update
ATTR_MEMBERS: ",".join(memberlist),
^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, NoneType found
Ok. I’ll look into it. Unfortunately I won’t be able to look at it until next week. Just disable the update until then.
Thanks, I've just spotted something that I think a few users on the forum might be interested in (https://community.home-assistant.io/t/microsoft-teams-status/202388/1). There's an endpoint to get external user presences (I think as long as they are a member of some description in a different tenant) - /communications/getPresencesByUserId
which accepts a post request like so:
{
"ids": [...str array of guids...]
}
I'll see if I can find some time to add the functionality to python-o365 so it could then be used as part of this integration which if I can figure out, I'd be happy to open up a PR 👍
Sounds good
Thanks, I've just spotted something that I think a few users on the forum might be interested in (https://community.home-assistant.io/t/microsoft-teams-status/202388/1). There's an endpoint to get external user presences (I think as long as they are a member of some description in a different tenant) -
/communications/getPresencesByUserId
which accepts a post request like so:{ "ids": [...str array of guids...] }
I'll see if I can find some time to add the functionality to python-o365 so it could then be used as part of this integration which if I can figure out, I'd be happy to open up a PR 👍
Just a thought, the integration already gets current user teams status. Are you trying to add the ability to get another users status?
Yes, in this case from an external directory (work disabled the ability to create app registrations and won't approve this without good business justification).
Something to think about for python-o365, how do people supply a guid when probably what they know is an email address.
Logger: homeassistant.setup Source: setup.py:398 First occurred: 13:17:19 (1 occurrences) Last logged: 13:17:19 Error during setup of component o365 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/o365/coordinator.py", line 230, in _async_update_data await self._async_teams_chat_update(key) File "/config/custom_components/o365/coordinator.py", line 280, in _async_teams_chat_update ATTR_MEMBERS: ",".join(memberlist), ^^^^^^^^^^^^^^^^^^^^ TypeError: sequence item 0: expected str instance, NoneType found homeassistant.exceptions.ConfigEntryNotReady: sequence item 0: expected str instance, NoneType found
This error seems to be because one of the members of the chat group has no DisplayName. I'm adding a fallback to email address
Issue should be fixed with v4.7.2
Thanks, all is working now :1st_place_medal:
Hi,
I'm trying to link my personal Office 365 account (M365 Business Premium so technically a "work" account) with Home Assistant to be able to send notifications to my actual work account.
This integration creates the chat sensor, but when setting
enable_updates
to true under thechat_sensors
section, the integration no longer loads with the following error logged:What is needed to enable the
o365.send_chat_message
service (https://rogerselwyn.github.io/O365-HomeAssistant/services.html#o365send_chat_message)?Thanks