WTH Is it so cumbersome to automate on Who/What changed a entity last/previous?

I know about trigger.to_state.context.user_id / trigger.from_state.context.user_id.

For example a light that got turned on by a HA automation has the same user_id (None) as turning a light on at the switch (integrated via Z2M)

My main use case would be a “simple” check in automations to halt(not turn off) if HA flipped the switch or someone intentional via the app or at the physical switch.

Additional attribute for the last state would be nice to have.

Coming from Node-Red,
it was very easy to always and everywhere check for an entities previous state & attributes.

Duplicate: WTH There's no "who changed a switch" sensor?

1 Like