Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many error messages #65

Closed
mikezieg opened this issue Apr 23, 2024 · 7 comments · Fixed by #66
Closed

Many error messages #65

mikezieg opened this issue Apr 23, 2024 · 7 comments · Fixed by #66
Assignees
Labels
enhancement New feature or request

Comments

@mikezieg
Copy link

mikezieg commented Apr 23, 2024

I found many error messages like this in my log file:
2024-04-22 06:14:13.000 ERROR (MainThread) [custom_components.illuminance.sensor] Illuminance met.no: Cloud coverage sensor state is not a number between 0 and 100: 138
There are more than 1000 lines like this - per second!
That doesn't just happen with met.no but also with other weather-integrations. The coverage sensors seems to give values above 100 especally at night.

@pnbruckner
Copy link
Owner

pnbruckner commented Apr 23, 2024

I've actually only (at least recently) used it with the cloud coverage sensor from OpenWeatherMap, and I've never seen this happen with that service.

I do have Met.no configured, but it only creates a weather entity, so the Illuminance integration only uses its state, which is a weather condition. I do see, however, that it does have a cloud coverage attribute. Have you created a template sensor from that which you then use as an input to the Illuminance integration?

I'm not sure why a weather service would produce a cloud coverage percentage over 100%. That doesn't make sense. But, if it is a common problem, I suppose I could try to make the Illuminance integration tolerant of it. But what would a value above 100 mean? I suppose the easiest thing to do would be to just treat any values over 100 as 100. I guess no sense in reporting an error, or even a warning, in this case.

@mikezieg
Copy link
Author

Have you created a template sensor from that which you then use as an input to the Illuminance integration?
Yes.
I have tried various weather integrations and this one generally seemed good to me because it provides a lot of information. But Astroweather has the same problem. Maybe the value has a different meaning at night?
But I also don't understand why there are so many error messages. It seems to me that this puts quite a lot of stress on the system.

@pnbruckner
Copy link
Owner

But I also don't understand why there are so many error messages. It seems to me that this puts quite a lot of stress on the system.

Because I never expected something to generate a cloud coverage percentage value above 100%. I expected bad values to come from a bad sensor, and the user would stop using it.

@pnbruckner
Copy link
Owner

@mikezieg let me know if 5.4.3 solves the problem for you.

@pnbruckner pnbruckner reopened this Apr 23, 2024
@pnbruckner pnbruckner self-assigned this Apr 23, 2024
@pnbruckner pnbruckner added the enhancement New feature or request label Apr 23, 2024
@mikezieg
Copy link
Author

It's good at the moment. I'll check it again this evening.
Thank you for the fast reaction.

@pnbruckner
Copy link
Owner

Looking back on what you said a couple of times, I understand why the error occurred, but I guess I didn't catch the fact that you said, "There are more than 1000 lines like this - per second!" I can't understand how that could happen.

I.e., the sensor only updates once every 5 minutes (by default), or whenever the input entity (in this case, the cloud coverage sensor) updates. The periodic update frequency can be changed, but the minimum period is 30 seconds. So, if there were 1000's of errors per second, the only way I can see that could happen is if the cloud coverage sensor was updating that fast.

@mikezieg
Copy link
Author

Great, there are no more entries in the error log.
I can't say why there were so many before.
In any case, thank you again for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants