Skip to content

Convert history calls to use new websocket endpoint#12662

Merged
balloob merged 11 commits intohome-assistant:devfrom
bdraco:history_websocket
May 18, 2022
Merged

Convert history calls to use new websocket endpoint#12662
balloob merged 11 commits intohome-assistant:devfrom
bdraco:history_websocket

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 11, 2022

Proposed change

Switch history calls to use new websocket endpoint which reduces the contention for the http connection and improves the response time.

Requires home-assistant/core#71688

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@zsarnett zsarnett self-requested a review May 11, 2022 15:22
@zsarnett zsarnett self-assigned this May 11, 2022
@bdraco bdraco marked this pull request as ready for review May 11, 2022 18:58
@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented May 11, 2022

Unrelated to this PR since its doing it with the rest api, I noticed that history requests the full past 24 hours every 10 seconds when the card is open and firing events. Logbook only requests what has changed since the last window. I think the cache might be broken

@bdraco bdraco force-pushed the history_websocket branch from e61055e to 97b4bab Compare May 15, 2022 04:20
@balloob balloob merged commit f807618 into home-assistant:dev May 18, 2022
@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented May 18, 2022

Thanks. This will help with testing (once there is a new release pushed) some of the rest apis on instances I can't run frontend dev since I won't have unexpected calls firing off.

@github-actions github-actions bot locked and limited conversation to collaborators May 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants