Best lovelace card for graphing sleep?

I would like to graph sleeping patterns, i’m currently using a contact sensor (binary) and the only card i seem to be able to use is the history card, which shows patterns but it’s very basic. Ideally i’d like to get see some more graphing options (lines/columns/bars rather then just binary information.

Anyway of doing this with a binary sensor ? The sensor card only accepts sensors, not binary ones.

Check out Apexcharts

Also you may need to create a history stats sensor to track the actual time asleep based on your binary sensor:

1 Like

Nice one, thanks Tom. I’ll have a look at this.