Create a history graph based on a timeseries with different states as one bar

Hello

I would like to do the same type of graph as they have done in Home Assistant:
image

I have a timeserie with a timestamp and a state “on” or “off”.

2024-04-07 11:45:06 off
2024-04-07 11:50:06 off
2024-04-07 11:55:06 on
2024-04-07 12:00:06 on
2024-04-07 12:05:06 off

The state is considered as valid for 5 minutes, no color or grey “unavailable” between can be used.

Thanks

Hi @IJK Welcome to the community.

This topic I answered a while ago should get you started.