Event Emitter - Pass Custom Data to Node Red

After moving the majority of my lighting and sonos automations over to Node-Red, I discovered that its actually quite difficult to find a simple way of passing data from Lovelace to NR.

Should be easy right? :man_facepalming:

There are a few cheat methods, such as input_booleans, scripts or mqtt, but they all still have their drawbacks, and I really hate red squiggly lines in VS Code (incomplete scripts) ! :rage:

So I figure there should be a simpler way and… the result was Event Emitter - which essentially does nothing, but allows my to get data easily into Node Red!

Simply call the service, and the data appears! :partying_face:

In this example (and in my personal setup), I one a field named event as the routing point between various flows.

It can be installed using HACS (Custom) or copy the code from GH :+1:

NB: If there is actually an in-built easier way (its true… i might have had a man look when trying to work out a solution) - please let me know! :beers:

Check out the latest update to the NR package https://community.home-assistant.io/t/node-red-contrib-home-assistant-websocket/71032/471?u=kermit