Weather binding updateInterval should be optional

Hi, all.

I’ve been continuing to play with the weather binding, and I just wonder why the “updateInterval” configuration setting is required instead of optional. Anyone know the history on this?

Seems like it should be optional and if not provided in the openhab.cfg some reasonable default value would be used instead.


I suspect that there is no default because it is dependent on a particular weather provider’s rate limits and user preferences, and no default seemed to fit all circumstances. From the wiki:

Important: Each weather provider has a daily request limit for the free weather api. Also the weather does not change quickly, so please choose a moderate updateInterval. The request limit can be found on the weather provider website.

It doesn’t look like it would break anything to add a default here, since it would be overridden if specified in the config, if you want to submit a PR. But I would recommend a very long interval, 60 or more minutes, so users who take the default don’t get into the situation where their API limits are being hit and they don’t know why.