metbosch / homebridge-http-temperature

HomeBridge HomeKit Plugin for HTTP temperature endpoints
https://www.npmjs.com/package/homebridge-http-temperature
Apache License 2.0
33 stars 18 forks source link

complex data structure #21

Closed cpo81 closed 3 years ago

cpo81 commented 4 years ago

Hi, I get a response in the form

{ "Header":{ "Version":5, "Device":"80", "Timestamp":1588082165 }, "Data":{ "Inputs":[ { "Number":4, "AD":"A", "Value":{ "Value":15.7, "Unit":"1" } } ]}, "Status":"OK", "Status code":0 }

from the http request from my device. How can I get the Value 15.7? I tried [0].[0].Value and some similar things. Can you help me?

MatsA commented 4 years ago

Hi! Havn't tested but think Data.Inputs[0].Value.Value will do the job.

metbosch commented 4 years ago

@cpo81 You should set the field_name to what @MatsA said. Could you please let us know if it works?

metbosch commented 3 years ago

Closing the issue as it is already supported