Hi, I’m trying to extract the presence status for the locations “Home” and “School” from this JSON output. I have validated the output and my HA instance seems to be able to pull the data just fine, but I can’t figure out how to turn it into a sensor. I don’t know JSON (or any programming actually) so I’m struggling with the json_attributes_path, json_attributes, and value_template. What should I set those to? Thanks in advance!
{
"main": {
"st": {
"value": null
},
"mndt": {
"value": null
},
"mnfv": {
"value": "V110AUCU1ASD1"
},
"mnhw": {
"value": "1.0"
},
"data": {
"value": "{\"payload\":{\"if\":[\"oic.if.baseline\"],\"n\":\"x.geofence.list\",\"rt\":[\"x.com.samsung.geofence.list\"],\"x.com.samsung.geofenceList\":[{\"x.com.samsung.regionRadius\":213,\"x.com.samsung.name\":\"Home\",\"x.com.samsung.checkout\":true,\"x.com.samsung.color\":\"#0FC5FC\",\"x.com.samsung.requestTime\":\"1590606021064\",\"x.com.samsung.longitude\":-90.000000000000,\"x.com.samsung.creationTime\":\"1590606021000\",\"x.com.samsung.checkin\":true,\"x.com.samsung.opType\":\"NEW\",\"x.com.samsung.latitude\":45.0000000000000,\"x.com.samsung.id\":73595}]}}"
},
"di": {
"value": "xxxxxxxx"
},
"mnsl": {
"value": null
},
"dmv": {
"value": "IoTivity1.2.1"
},
"n": {
"value": "SmartThings Tracker (0CTR)"
},
"mnmo": {
"value": "SM-V110A_NA_ATT"
},
"vid": {
"value": "IM-TRACKER-NORMAL-000001"
},
"mnmn": {
"value": "Samsung Electronics"
},
"mnml": {
"value": null
},
"geofencesStatus": {
"value": "[{\"id\":83631,\"name\":\"Home\",\"presence\":\"present\"},{\"id\":83633,\"name\":\"School\",\"presence\":\"not present\"}]"
},
"mnpv": {
"value": "2.4"
},
"mnos": {
"value": "Tizen"
},
"geofences": {
"value": "[{\"id\":83631,\"presence\":\"present\"},{\"id\":83633,\"presence\":\"not present\"}]"
},
"pi": {
"value": "xxxxxxxxxxxxx"
},
"icv": {
"value": "core.1.1.0"
}
}
}