-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
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
Delay stream startup #142447
base: dev
Are you sure you want to change the base?
Delay stream startup #142447
Conversation
Test failures seem unrelated. |
@@ -290,7 +289,7 @@ def _async_value_from_stream(self, value: Any) -> None: | |||
"""Update the entity with the latest value from the stream.""" | |||
raise NotImplementedError | |||
|
|||
@cached_property | |||
@property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it changed from cached_property
to property
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug that has only became apparent due to the change in stream behaviour. The cached property was not changing when the stream connected property changes. Making it a non cached property fixed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks @Bre77!
Proposed change
Teslemetry stream sends cached data on connection, but since the stream was starting before platforms had loaded, this data was lost. This changes the stream to only start after all platforms have loaded, so that no data is lost at startup.
Teslemetry/python-teslemetry-stream@v0.7.1...v0.7.2
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: