RogerSelwyn / O365-HomeAssistant

Office 365 integration for Home Assistant
MIT License
195 stars 15 forks source link

TypeError: O365CalendarEntity.async_modify_calendar_event() missing 2 required positional arguments: 'recurrence_id' and 'recurrence_range' #227

Closed robinbohnen closed 4 months ago

robinbohnen commented 4 months ago

Hi,

Tried modifying a calendar event and filled all required fields. It is fails with an Unknown Error. In the logfile it states; TypeError: O365CalendarEntity.async_modify_calendar_event() missing 2 required positional arguments: 'recurrence_id' and 'recurrence_range'

Not sure what I need to do now. Any ideas?

RogerSelwyn commented 4 months ago

Could you expand on where you were updating from? There are two services and also the calendar panel you can update from. Please also provide the full error from the error log using the <> from the Github toolbar.

robinbohnen commented 4 months ago

Offcourse, I am updating with this call;

service: o365.modify_calendar_event data: event_id: "event_id" subject: "subject" end: >- {{ (as_timestamp(now()) + (60*20) | float) | timestamp_custom('%Y-%m-%dT%H:%M:%S+0200') }} target: entity_id: calender.id

And this is the full error;

Logger: homeassistant.helpers.script.websocket_api_script Bron: helpers/script.py:501 Eerst voorgekomen: 14:58:16 (1 gebeurtenissen) Laatst gelogd: 14:58:16

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: O365CalendarEntity.async_modify_calendar_event() missing 2 required positional arguments: 'recurrence_id' and 'recurrence_range' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1039, in _handle_entity_call task = hass.async_run_hass_job(job) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 950, in async_run_hass_job return self._async_add_hass_job( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 758, in _async_add_hass_job hassjob.target(*args), name=hassjob.name, loop=self.loop ^^^^^^^^^^^^^^^^^^^^^ TypeError: O365CalendarEntity.async_modify_calendar_event() missing 2 required positional arguments: 'recurrence_id' and 'recurrence_range'

RogerSelwyn commented 4 months ago

OK, I'll take a look over the next few days

RogerSelwyn commented 4 months ago

Should be fixed with v4.7.4

robinbohnen commented 4 months ago

Works again! Thanks!

RogerSelwyn commented 4 months ago

I'll probably tag a few posts, but I'm trying to get some views. I'm considering breaking up the monolithic O365 integration into smaller, more manageable items. If you have a view, please comment here:

O365 --> MS365 - A potential big change - your views needed