See who updated a device/entity inside automation?

Hey,

Does anyone know if it’s possible to see who changed a device/entity when using nodered?
I know visually you can check it using history or logbook.

However I want to create an automation depending on who turned on the light, to use a preference. Also in certain rooms I want to change the behaviour on wether I turned the light on manually (either app or switch) or by motion sensor.

The last idea I already solved by using a helper to track and set what changed it (person of device). However I think this can be simplified.

I already split up the users (wife, me and nodered) so I can already track who turned on what. Now if only I could see this in nodered…

Thanks

Sorry to post a none helpful answer and a question instead.

How are you tracking when nodered makes the change? I’m constantly trying to figure out if nodered did something or someone else.

Simple. You create a seperate user for nodered. Following by logging with said user and give it an access token. In nodered you use that token. Now everytime nodered updates something, you see nodered did it instead of your own user.