staromeste / homebridge-http-advanced-accessory

Supports all devices on HomeBridge Platform / Bridges devices to http
Apache License 2.0
67 stars 23 forks source link

Please help to understand how to make config for AirQualitySensor #31

Closed mrmaximas closed 2 weeks ago

mrmaximas commented 3 years ago

Hi @staromeste ! I have Air Quality sensor with this json format of http answer, but i'm not fully understand how to parce and convert for HK values. Please help! Thanks! {"Sensors":[ { "TaskValues": [ {"ValueNumber":1, "Name":"PMS1", "NrDecimals":0, "Value":5 }, {"ValueNumber":2, "Name":"PMS25", "NrDecimals":0, "Value":5 }, {"ValueNumber":3, "Name":"PMS10", "NrDecimals":0, "Value":5 }], "TaskEnabled":"true", "TaskNumber":1 }, { "TaskValues": [ {"ValueNumber":1, "Name":"Temp", "NrDecimals":2, "Value":8.97 }, {"ValueNumber":2, "Name":"Hum", "NrDecimals":2, "Value":55.12 }, {"ValueNumber":3, "Name":"Press", "NrDecimals":2, "Value":1025.68 }], "TaskEnabled":"true", "TaskNumber":2 } ], "TTL":60000 }