RFXTRX binary_sensor last_triggered not available?

I use the KAKU (Klik Aan Klik Uit) door sensor which is a binary_sensor. In lovelace it shows as on or off. How can I change it that it would show the time it was last triggered? In this way I can see when the door was last opened or closed.

Use this as the value_template in a template sensor:

{{ as_timestamp(states.binary_sensor.name.last_changed) | timestamp_custom('%H:%M:%S') }}

Change binary_sensor.name to the entity ID of your binary sensor.

Works like a charm! Thanks. Bit new to HA and it is not always too straightforward. Thanks!

No prob! Some light reading for your reference :wink:



https://docs.python.org/3/library/time.html#time.strftime