You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the AM2315 returns bad values, these are currently set to NAN. The JSON returned from the REST API contains these values as nan, which is invalid because strings must be enclosed in quotes. Reading the JSON in R or Home Assistant fails with errors.
On my local compile, I've opted to replace the NANs with -999 and the JSON is parsed coreectly.
Another option would be to return null in place of the nan as null is valid JSON. I'm not sure whether this change should happen when the values are read or when the values are inserted into the JSON return.
The text was updated successfully, but these errors were encountered:
When the AM2315 returns bad values, these are currently set to
NAN
. The JSON returned from the REST API contains these values asnan
, which is invalid because strings must be enclosed in quotes. Reading the JSON in R or Home Assistant fails with errors.On my local compile, I've opted to replace the NANs with -999 and the JSON is parsed coreectly.
Another option would be to return
null
in place of thenan
asnull
is valid JSON. I'm not sure whether this change should happen when the values are read or when the values are inserted into the JSON return.The text was updated successfully, but these errors were encountered: