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

Store state last seen time separately #18806

Merged
merged 2 commits into from
Nov 30, 2018
Merged

Store state last seen time separately #18806

merged 2 commits into from
Nov 30, 2018

Conversation

emlove
Copy link
Contributor

@emlove emlove commented Nov 29, 2018

Description:

Follow up to #17270

After sleeping on it for a bit, I'm worried about using the last_updated time to expire old states. If hass is running for a long period of time, and an entity is only updated very infrequently, the state might be dropped unintentionally. For example, an input boolean might not ever be touched while hass is running. This PR adds a wrapping object around the stored state so that we can record the actual last time this state was active in hass.

This ensures that infrequently updated entities aren't accidentally
dropped from the restore states store
@emlove emlove requested a review from a team as a code owner November 29, 2018 21:17
@ghost ghost assigned emlove Nov 29, 2018
@ghost ghost added the in progress label Nov 29, 2018
@balloob balloob merged commit 22f27b8 into dev Nov 30, 2018
@ghost ghost removed the in progress label Nov 30, 2018
@delete-merged-branch delete-merged-branch bot deleted the restore-followup branch November 30, 2018 07:26
@balloob balloob mentioned this pull request Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants