Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: coordinator refresh handling in HA 2024.3 #53

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

luuuis
Copy link
Owner

@luuuis luuuis commented Mar 12, 2024

Workaround for a breaking change in DataUpdateCoordinator._job that was introduced in home-assistant/core#111570.

This only manifests in integrations that are overriding DataUpdateCoordinator._handle_refresh_interval and still using event.async_track_point_in_utc_time to refresh, as that will pass the current time as an arg, leading to a TypeError as described in #49.

2024-03-11 00:00:00.418 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback _TrackPointUTCTime._run_action()
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1468, in _run_action
    self.hass.async_run_hass_job(self.job, self.utc_point_in_time)
  File "/usr/src/homeassistant/homeassistant/core.py", line 727, in async_run_hass_job
    hassjob.target(*args)
TypeError: DataUpdateCoordinator.__wrap_handle_refresh_interval() takes 1 positional argument but 2 were given

luuuis added 2 commits March 11, 2024 12:23
…ositional arg

work around a breaking change in the signature of the coordinator's self._job
@luuuis luuuis merged commit 975950d into master Mar 12, 2024
2 checks passed
@luuuis luuuis deleted the fix-coordinator-scheduling-ha-2024.3 branch March 12, 2024 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant