Problem with history stats bar

I created a person group, with in it me, my wife and my oldest son.
The state of the entity is always correct, i.e. home or not_home
But when I look at the history stats bar it seems completely incorrect.

And here you can see that me and my wife are at home, but the group is still away. Even though the entity state is in fact home.

Is this a bug or could this be a database issue? I use MariaDB on a separate server.

If I reload the groups from the development tools, de bar is corrected to the right state from that moment on.

I thought I’d try with the Zone number, but that one also seems to not work correctly.

Currently there are 2 people in the house, as you can see at the current state.
But the graph still shows no-one is home.

Is this either a bug or a problem with my MariaDB database?

It seems that changing the database codetype and/or updating HA seems to have fixed the problem.