I have a device_tracker entity and trying to trigger an action when I leave a location - let’s call it ‘mall’.
On state change I want to pass the previous state to the next node. I have read that this is stored in payload.old_state.state. I have tried passing this, but my debugging shows that it is passing as ‘undefined’ rather than the actual location string.
This is the setup for my state node:
How do I get it to pass the old state string?