Node-RED package request - stoptimer that creates a Home Assistant entity with "time remaining"

I like to be able to show “time remaining” in my Lovelace dashboards:

To do this, I’ve hacked together a custom JavaScript function to update some entity nodes:

I’ve noticed that this is a pretty common pattern for my lights and fans, so I’d like to be able to easily set this up for all of my timer nodes. It would be great if the stoptimer node could automatically create a Home Assistant entity and update the time remaining, so you could see this in Lovelace dashboards.

I haven’t created a custom npm package for Node-RED before, but I could look into working on this. Just wanted to see if this already existed, or am I over-engineering something that can already be done from Home Assistant / Node-RED?

Check out this improved version of Stoptimer. I believe the 3rd output can help do what you want.

From that page:

1 Like

That’s great, thanks! The third output makes it much easier to set up an entity node and report the time remaining.