Hey everyone. I’m trying to process using sensor data sent via MQTT. Is there a way to define the data received in json in a variable?
The data received looks like this: {"bounding_box":{"time":2077316,"label":"button","value":0.90234375,"x":96,"y":32,"width":8,"height":8}}
{"bounding_box":{"time":2077316,"label":"button","value":0.90234375,"x":96,"y":32,"width":8,"height":8}}
For example, define the value of time as a variable.
I assume you’re using an MQTT sensor. You can specify a “json_attributes_topic” to load some (using “json_attributes_template”) or all of the detail into attributes. For example you could have a template of "{{ value_json.bounding_box }}".
"{{ value_json.bounding_box }}"
Thank you very much! I was able to resolve the issue successfully.