Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I have noticed that the heartbeats seem to stop after a KLF reboot (or any other reconnect).
After looking into the code it seems like the heartbeat is not recreated, so after the stop function was called once, the stopped parameter stays False and will never be set back to True. Therefore when start is called at the next reconnect (at least it seems like it is called) it will immediately stop again.
This PR has fixed the issue for me, but i did not dig deeper into the code and did not do rigorous testing.
As a side effect this seems to have fixed some issues with the HouseStatusmonitor (states were not being updated)