Closed ildar170975 closed 6 months ago
If platforms get loaded multiple times the calculation will be wrong.
If HA allows for platforms "get loaded multiple times" - then may be HA should consider these possible cases? I.e. this is not just a "problem in custom component", this is "HA does not consider this case".
It's not possible to detect every incorrect way that an integration may write their code.
t's not possible to detect every incorrect way that an integration may write their code.
Agree. But my point is: -- since some platform may be "get loaded multiple times" - then this could happen since HA allows to do it "multiple times"; -- then either HA should disable this possibility (i.e. a platform may be loaded one time only); -- or HA should consider these "get loaded multiple times" cases as a possible scenario when calculating a "startup time".
See, I know nothing about HA internals, my proposals are only based on you explanation.
It wouldn’t make sense to try to work out the timings for a component that doesn’t await its platform setups since it has a much larger problem that it could get reloaded while its platforms are being setup. Once the component fixes that the timings will be correct.Since the custom component runs at the same privilege level as HA, there is nothing we can do to prevent a custom component from loading platforms without awaiting their setup. IMHO, it’s a good thing that it returns a nonsensical result since it makes it obvious there is a problem with the custom component that needs to be fixed as otherwise it would have probably gone unnoticed Sent from my iPhoneOn May 17, 2024, at 2:23 AM, ildar170975 @.***> wrote:
t's not possible to detect every incorrect way that an integration may write their code.
Agree. But my point is: -- since some platform may be "get loaded multiple times" - then this could happen since HA allows to do it "multiple times"; -- then either HA should disable this possibility (i.e. a platform may be loaded one time only); -- or HA should consider these "get loaded multiple times" cases as a possible scenario when calculating a "startup time". See, I know nothing about HA internals, my proposals are only based on you explanation.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
Thanks for explanation. Will open an issue for this integration.
@bdraco Shall I close THIS issue?
For the record - issue for Gismeteo integration - https://github.com/Limych/ha-gismeteo/issues/191
Yes
Again for the record - the author of Gismeteo integration declines that this "negative startup time" could be a "integration issue". https://github.com/Limych/ha-gismeteo/issues/191#issuecomment-2117664356
yes, the time in your picture is strange, but this does not in any way affect the correctness of work of the integration. This means this is NOT an integration issue.
The problem
Settings -> Repairs -> Integration startup time a negative value is shown:
What version of Home Assistant Core has the issue?
2024.5.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response