Logbook - define range

Hi there,

I’m looking for a way to display how many times (and what time exactly) a motion sensor was triggered during a specific time (in my case nighttime) - and display it in a card. I know that I can achieve some of that with the Logbook - but how do I display that in a lovelace card? The card 'logbook" doesn’t seem to have the same refined settings, as I can only see “past 12 hours” - which if course changes all the time.

I’ve also tried history_stats but I can’t really see any timestamps there.

Any solutions?

Have a look at this custom card:

Thanks tom_l,

I tried it out and while it’s a nice card, I don’t seem to be able to define to only show motions happening between 11pm-6am. The only thing I can find regarding time is " history_days_back" and " include_history", which isn’t helping me as it gives me motions for the whole day. Perhaps it’s somewhere in there, but I don’t can’t find it.