naofireblade / homebridge-weather-plus

A comprehensive weather plugin for homebridge.
MIT License
316 stars 63 forks source link

Missing rain value in forecasts from dark sky API when a day is skipped in config #187

Closed MBarti closed 3 years ago

MBarti commented 3 years ago

from the logs:

[2/21/2021, 3:34:32 PM] [homebridge-weather-plus] This plugin generated a warning from the characteristic 'Air Pressure': characteristic was supplied illegal value: number 1024 exceeded maximum of 255. See https://git.io/JtMGR for more info. [2/21/2021, 3:34:32 PM] [homebridge-weather-plus] This plugin generated a warning from the characteristic 'Ozone': characteristic was supplied illegal value: number 309 exceeded maximum of 255. See https://git.io/JtMGR for more info.

naofireblade commented 3 years ago

What version of the plugin are u using?

Nastras commented 3 years ago

Hi @naofireblade

I use the latest version and get this hint.

8FA466A8-EE8E-4443-AEA2-62ED21C3D61A

naofireblade commented 3 years ago

Thanks for reporting. Will fix that asap.

naofireblade commented 3 years ago

I tried to reproduce the error but I had no success. Can you post your plugin config? Could you also set the environment variable DEBUG to "homebridge-weather-plus" in Homebridge UI Settings?

Nastras commented 3 years ago

"platforms": [ { "platform": "WeatherPlus", "service": "darksky", "key": "xxxxx", "location": [xx.xxxxxx, x.xxxxxx], "language": "de", "units": "metric", "interval": 5, "conditionCategory": "detailed", "compatibility": "eve", "nameNow": "Wetteraktuell", "nameForecast": "Wettervorhersage", "hidden": [], "forecast": [1] } ] }

Nastras commented 3 years ago

Debug mode I have just switched on. Waiting for the error to occur 😉

Nastras commented 3 years ago

5F26CD14-1983-450B-8E96-104CCC4D04D3

Nastras commented 3 years ago

Is that enough for you or do you need a longer log? If so, I would provide it to you in the Smart Apple forum?

naofireblade commented 3 years ago

That should be enough.

Nastras commented 3 years ago

👍

naofireblade commented 3 years ago

That one was hard to nail down. The rain forecast with dark sky has a bug when u skip some days. You only want the forecast for the next day (1) and not the one for today (0). That causes a bug in the plugin.

Nastras commented 3 years ago

Cool that you were able to determine it. What exactly do I have to change in the config so that this bug no longer occurs? Thx!

naofireblade commented 3 years ago

You can just add the 0 to the forecasts so that you get the forecast for today and tomorrow. "forecast": [0,1] Or wait until I publish the fix.

Nastras commented 3 years ago

All right then, I'll add the 0 for now. Thanks for the help!

naofireblade commented 3 years ago

I just released version 3.2.6 that fixes your issue.