Skip to content

Improvement: Fill gaps in history from HA#1064

Open
Triple-S wants to merge 1 commit intoRomRider:masterfrom
Triple-S:fill-gaps-in-history
Open

Improvement: Fill gaps in history from HA#1064
Triple-S wants to merge 1 commit intoRomRider:masterfrom
Triple-S:fill-gaps-in-history

Conversation

@Triple-S
Copy link

Hello,

I recently noticed that one of my series had gaps even though I had enabled the fill_raw option to fill gaps. Looking to the code I realized that fill_raw only works if the gap exists because the HA history reports null, undefined, unavailable, etc., but it does'nt work if the HA history simply reports nothing aka. an actual gap.

This PR fixes this problem by simply scanning the reported history for actual gaps and filling any found gaps with null states which are then later taken care of by the fill_raw logic. This is safe because the HA history is not supposed to have gaps unless some sort of data corruption occurred.

Bets regards,
Triple-S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant