Logbook card - have visibility only if state has changed in X mins

I want a Logbook Card on my dashboard ONLY if an entity has been a particular state at any point in the last 12 hours or so. How the visibility works seems to be only if a particularly state exists at present.

So in the example below, I want the Logbook Card to show if the entity has Triggered at any point in the last 12 hours.

How can I do this so visibility looks to the state of an entity over a period of time, rather than present time?


I’d setup an automation that starts a timer, and would use this as the criteria for the card. Something like “if timer is running turn on a template helper, and if timer finishes, turn the helper off”. Your card would react on the on/off state of that helper.

This would have the advantage, that the timer survives a HA restart, and it could be started again, if a new event comes up, in your case the alarm was triggered a second time inside that twelve hour window.

You could also use a trigger based template sensor for that, by personally I’d go with the timer. :slight_smile:

this worked, thanks!!!

1 Like