Problem reading a value in de json

Issue #4 resolved
Former user created an issue

Hi, I like your App very much, but i have a small problem reading the next json file and maybe you have a solution for it.

{ "sn": { "Time": "2023-01-29T10:44:37", "DHT11": { "Temperature": 17.8, "Humidity": 44, "DewPoint": 5.4 }, "S8": { "CarbonDioxide": 800 }, "VINDRIKTNING": { "PM2.5": 12 }, "TempUnit": "C" }, "ver": 1 } Reading of the values is no problem with your card except for the tag "PM2.5". This is probably caused by the dot between the 2 and the 5. I don't know if this is a bug or a violation of the json syntax rules.

Comments (11)

  1. arie repo owner

    Yeah, this will not work in javascript.

    Try:

    VINDRIKTNING[”PM2.5”]

  2. Frans Smulders

    Hi Arie, i did change it but same result, number 3 is still zero and i got an error message: Error: Cannot read properties of undefined (reading 'NaN')

  3. Log in to comment