Hi guys,
I’m a bit new here so I struggle with some basics.
Hopefully you can help me out.
I have a AirVisual Pro that I would like to integrate into HA.
It uploads all data to an API and can be queried.
However it’s rate limited which means I cannot setup multiple REST sensors to pull all the data.
I’ve tried to use json_attributes but it doesn’t seem to work on nested json.
The json looks like this (truncated as there are a lot of data).
{"settings":{"node_name":"home"},"current":{"ts":"2018-05-29T23:50:24.988Z","tp":23.4,"hm":54,"p2":4,"p1":4,"co":1092},"historical":{"instant":[{"ts":"2018-05-29T23:50:24.988Z","tp":23.4,"hm":54,"p2":4,"p1":4,"co":1092},{"ts":"2018-05-29T23:45:23.273Z","tp":23.4,"hm":54,"p2":5,"p1":60,"co":1091},{"ts":"2018-05-29T23:40:24.875Z","tp":23.4,"hm":54,"p2":4,"p1":15,"co":1086},{"ts":"2018-05-29T23:35:25.378Z","tp":23.4,"hm":54,"p2":4,"p1":37,"co":1079},{"ts":"2018-05-29T23:29:22.592Z","tp":23.4,"hm":54,"p2":2,"p1":2,"co":1070},{"ts":"2018-05-29T23:28:22.570Z","tp":23.3,"hm":54,"p2":2,"p1":2,"co":1071},{"ts":"2018-05-29T23:27:22.567Z","tp":23.3,"hm":55,"p2":2,"p1":13,"co":1068},{"ts":"2018-05-29T23:26:22.567Z","tp":23.3,"hm":55,"p2":2,"p1":13,"co":1067},{"ts":"2018-05-29T23:25:22.565Z","tp":23.3,"hm":53,"p2":2,"p1":23,"co":1064},{"ts":"2018-05-29T23:24:22.574Z","tp":23.2,"hm":53,"p2":3,"p1":3,"co":1061},{"ts":"2018-05-29T23:23:22.563Z","tp":23.2,"hm":55,"p2":3,"p1":13,"co":1059},{"ts":"2018-05-29T23:22:22.551Z","tp":23.2,"hm":55,"p2":2,"p1":2,"co":1059},{"ts":"2018-05-29T23:21:23.402Z","tp":23.1,"hm":55,"p2":2,"p1":2,"co":1059}
I want to get current.hm, current.p2, current.p1 & current.co in one query as attributes to the sensor.
Can anyone give me some pointers?