Device tracker attributes in Node Red

I have been looking for a solution for this for this in the forums for a while but couldn’t find anything conclusive so far.
Home assistant is handling the device trackers with zones easily and I like it but when I get the device tracker states in node-red, there are only 2, either home or not_home. for example if I am at work, I can’t see the friendly name of the zone in payload, so I can’t distinguish if I am at work or school or gym (I am never there anyways…)
I am using google location sharing, other device trackers work differently?

{
“entity_id”:“person.serkan”,
“state”:“home”,
“attributes”:{
“editable”:true,
“id”:“XXXXXX”,
“gps_accuracy”:15,
“source”:“device_tracker.google_maps_XXXXXXX”,
“user_id”:“XXXXXX”,
“friendly_name”:“Serkan”,
“entity_picture”:“/local/serkan_device.jpeg”
},
“last_changed”:“2019-06-16T06:08:30.645367+00:00”,
“last_updated”:“2019-06-16T06:38:19.784017+00:00”,
“context”:{
“id”:“XXXXXXX”,
“parent_id”:null,
“user_id”:null
},
“timeSinceChangedMs”:1789225
}

node red’s geofencing is the only option here?

I get the friendly name in msg.payload using the events.state node in node-red-contrib-home-assistant-websocket using GPSLogger device trackers.

How are you getting the tracker states into Node-Red (I’m unclear on what your code is referencing)?

I am just using the trigger: state node with google maps location sharing. the piece I posted was the output of message node. Only friendly name I see in the message is the friendly name of device, not the friendly name of the zone. As in, if I am at work, the state is not_home but it doesn’t say anywhere if I am in work “zone”.

image

Hmm. I just tested mine with the trigger.state node and I’m still getting the friendly name…

Have you double-checked the map component to verify the location being reported by your device.tracker is within a defined zone parameter?

sorry for the late reply, but couldn’t test is again. yes, now it looks right.