core icon indicating copy to clipboard operation
core copied to clipboard

Exceptional (!) shown when it's (a sunny) day

Open thomaskilian opened this issue 2 years ago • 17 comments

The problem

See the issue https://github.com/home-assistant/frontend/issues/12349 where I posted the details already.

Basically the status is set to Exceptional when it's bright day. Night and rain are shown normally. (I have no clue how the sensor will know the cloud status since it only has light (three compass directions), wind (same directions), rain and a day/night switch.

What version of Home Assistant Core has the issue?

2022.4.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Somfy

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

If you tell me where to find useful details I'll happily share them

Additional information

No response

thomaskilian avatar Apr 28 '22 20:04 thomaskilian

Hey there @tetienne, mind taking a look at this issue as it has been labeled with an integration (somfy) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)


somfy documentation somfy source (message by IssueLinks)

@thomaskilian are you sure you use the Somfy integration? This doesn't support the weather sensor. Could you perhaps share more information about your setup?

iMicknl avatar May 10 '22 18:05 iMicknl

Well, I'm not sure. I have a SOMFY AS 315N weather station from where I get the meterological data. These I supply as detailed here. And that partially works. Except when it's sunny outside. No idea where from it gets the idea about the clouds and why it always show "clear night"

thomaskilian avatar May 10 '22 22:05 thomaskilian

Ah, so you don’t use the Somfy integration but the KNX integration?

@thecode could you possible relabel this issue? ☺️

iMicknl avatar May 10 '22 23:05 iMicknl

knx documentation knx source (message by IssueLinks)

Hey there @julius2342, @farmio, @marvin-w, mind taking a look at this issue as it has been labeled with an integration (knx) you are listed as a code owner for? Thanks! (message by CodeOwnersMention)

Night and rain are shown normally. (I have no clue how the sensor will know the cloud status since it only has light (three compass directions), wind (same directions), rain and a day/night switch.

Hey! Exactly - it doesn't know. We wrote some logic for this but it's rather... controversial (also due to the fact that illuminance (brightness) varies based on where on the world you are located). I think we should probably change the default.

You can find the logic here. For most things like rain, sunny, night this works just fine but there are some edge cases to it. https://github.com/XKNX/xknx/blob/main/xknx/devices/weather.py#L336-L371

But I'm afraid, without an additional data source we cannot reliably compute states like cloudy.

marvin-w avatar May 10 '22 23:05 marvin-w

Ah, thanks for the pointer. I thought of looking up the code but without a start I was hesitant.

thomaskilian avatar May 11 '22 00:05 thomaskilian

Definitely that's where the exception comes from. I don't think it's legit to return any cloud information. If it's night then it returns WeatherCondition.CLEAR_NIGHT regardless. I would guess that the way it presents weather info is just wrong. There is a forecast service which fetches weather from the internet. That copes for the average values (which is wind, temperature, etc.). So the home sensor could go together with that to add just a few local data. In my case that would be the temperature, rain (just a binary and in any case not too useful) and wind. These would be local data and should be presented as such along with the data from the internet.

pic20220511121201

In any case it was disturbing to me to see two contradicting weather cards. Thoughts?

thomaskilian avatar May 11 '22 10:05 thomaskilian

The KNX integration does not have the ability to include forecasted weather information or "merge" it's weather data with data from other integrations. I was thinking about this too, but it's not a feasible approach and won't be accepted in core. Also, I think we should not merge some cloud information with the local data directly from the sensors.

marvin-w avatar May 11 '22 10:05 marvin-w

If you want that though you can just use the data from different weather / sensor entities in a weather template entity. But this configuration is up to you, not an integration.

farmio avatar May 11 '22 10:05 farmio

Maybe the weather forecast service could be extended to ask for local sensor data as addition to the web data and prepare those for a nice display?

thomaskilian avatar May 11 '22 10:05 thomaskilian

Oh, cross-post. Would you have some pointer as to how to setup that template? P.S. silly me. You had a link there already...

thomaskilian avatar May 11 '22 10:05 thomaskilian

I guess I do have a solution (still have to implement it). But in any case I don't think that the KNX weather should return any cloud information if it does not have it. These local sensor have sunligt, wind, rain and maybe more local details but likely never any cloud information.

thomaskilian avatar May 11 '22 10:05 thomaskilian

So just configure some KNX sensors 🤷 Having this small text was required for a HA weather entity. I think it is still, but have not looked into it.

farmio avatar May 11 '22 11:05 farmio

Yes, i will configure that. But basically the requirement from weather would be wrong. You can not fulfill that. There's only day and night you can deliver based on the light collection sensor. But never Clear Night or any migled cloud information.

Just remembering the Pink Floyd song Obscured by clouds. Well, that smoke...

thomaskilian avatar May 11 '22 12:05 thomaskilian

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 09 '22 13:08 github-actions[bot]