Hi.
I have a lot of motion sensors in my house and for some rooms I wanted a visual representation of how much time there were left before the lights turns off. You can of course do this with the timer but the problem is that, for the moment, you cant use the duration attribute as a stand alone sensor.
I made a subflow in Node-Red that updates a home assistant counter every second so you can do something like this:
The configuration is really simple:
I made a blog post about it here: www.frosenlind.se
The subflow can be found here: https://flows.nodered.org