Apex bar chart how long switch has been off

I’ve been struggling a little creating a apexchart that shows a simple bar chart for the last like 12h and showing minute count between each off to on state changes of a switch using the history stats.

Any suggestions?

There is no such easy (only? javascript) thing for apex fafaik…try to use the HA history_stats sensor or create a helper/template

1 Like