I want a card on my lovelace be setup so that, when I wake up in the morning and view my control panel, if my motion sensor went off in the middle of the night, I want there to be a card there to tell me. But otherwise I don’t want to see it.
I have a sensor called sensor.aarlo_last_kitchen_camera whose value is the last date/time the motion sensor went off in the kitchen camera (e.x. ‘11-06 2:21’). My thinking is that I can use the entity_filter card with the state_filter attribute telling it somehow that the value has to be greater than 24 hours ago (e.x. > ‘11-05 2:21’). I see > as an option, but I don’t know how to tell it to use 24 hours ago’s date (and have that dynamically change every date). Is this possible? If so, how would I do it?
you could create a template binary sensor that uses the sensor value for your last motion, converts it to a timestamp, adds 86400 seconds to it (24 hours in seconds), compares that to the current time and then use the result of that in your state filter.
you will need to try to get the year added into your last motion sensor for it to more easily work So the format of the sensor needs to be “11-06-2019 2:21”.