ha-illuminance
ha-illuminance copied to clipboard
Feature request: Support of Buienradar
As Dark Sky seem to be decommissioned, I'm moving towards Buienradar which is fully free (at least forthe time being).
Any possibility to support this? (or recommendation on how to customize the integration?)
Another free (and also Dutch) provider is the KNMI, which has a custom integration here: https://github.com/golles/ha-knmi
They both already map API conditions to homeassistant.components.weather
: knmi / buienradar
So maybe instead of adding buienrader/knmi specifically, this integration could add support for "any sensor which reports weather as a homeassistant.components.weather ATTR_CONDITION
"?
@titiviking sorry it's taken me a while to respond. I took quite a long break from Home Assistant. But I'm back at it. In fact I'm in the process of creating a significant new release of this custom integration, which I should hopefully have out soon.
I did a little digging into the buienradar integration. Unfortunately I couldn't get it to work for me for some reason. It kept timing out trying to retrieve data from the server (even though I could retrieve data using curl from the same machine I'm running HA on.) Anyway, looking at the code I can see all the conditions it can return, and the attribution string, so it should be relatively easy to add support. I'll go ahead and do that anyway, even if you're not interested anymore.
@emansom @titiviking I've created a beta release (3.1.0b0) that should support Buienradar which, unfortunately, I'm not able to test. Could you give it a spin? It should support both a weather
entity and a sensor
entity (that reports the same conditions as the weather entity.) Let me know if you if you're able to try it, how it works for you, or if you have any questions. Thanks!
@emansom @titiviking I've created a beta release (3.1.0b0) that should support Buienradar which, unfortunately, I'm not able to test. Could you give it a spin? It should support both a
weather
entity and asensor
entity (that reports the same conditions as the weather entity.) Let me know if you if you're able to try it, how it works for you, or if you have any questions. Thanks!
Thanks for working on this! 👍🏻
Gets detected, so far no errors reported. Running on latest and greatest HA.
I'll check in tomorrow to see what chart it plots.
(screenshot taken at night, so 0 lux is valid)
Functions as expected, reflects the sporadic overcast clouds Buienradar reports. 👍
@emansom thanks for trying it and providing feedback. Much appreciated!
Note that there may still be some issues with this type of input. E.g., if the attribution attribute is not set before HA finishes initializing, that may cause it to effectively be rejected (resulting in it constantly using the fallback value.) Or there may be some conditions that were missed in my code potentially resulting in an "unexpected condition" error (and, again, using the fallback value while that condition lasts.) So, by all means, let me know if any of that happens.
Lastly, you gave me a scare. I saw the value of "3.507 lx" and thought, why the heck is the value so small?! Then I remembered the period was a "thousands separator", not a decimal point. (We use the period & comma the opposite way, so I thought the value was about 3 and a half, not 3507.) LOL!
I'm giving it it try as of today. I'll keep an eye out the next days to see how it behaves. Thanks for the great effort into adding Buienradar as part of it!
@rigrig
So maybe instead of adding buienrader/knmi specifically, this integration could add support for "any sensor which reports weather as a homeassistant.components.weather ATTR_CONDITION"?
That's a good idea. I'll try to work on that next. I could get rid of all the custom mapping tables and just implement one (or, at least, for integrations that use those "standard" conditions.) That might change the resulting values for some integrations, but should still be reasonable. I'll probably, though, still need the initial mapping for the Dark Sky icon sensor (that maps to the standard conditions.)
Been a few days. Seem quite stable for now. Changes follow a good curve... I did have a surge for today though... 23000 lux seems a bit much...
I'll keep an eye out some more to see if it stabalises..
Note that there may still be some issues with this type of input. E.g., if the attribution attribute is not set before HA finishes initializing, that may cause it to effectively be rejected (resulting in it constantly using the fallback value.) Or there may be some conditions that were missed in my code potentially resulting in an "unexpected condition" error (and, again, using the fallback value while that condition lasts.) So, by all means, let me know if any of that happens.
@pnbruckner Been plenty of HA restarts. No error in the logs, no behavioral bug to report. 🎉
Set it up as source for the brightness value of all lights and desktop monitor, it all works beautifully to emulate biodynamic lighting.
@emansom @titiviking Has the Buienradar integration changed by any change? I am not seeing any cloud coverage percentage in the data that I am getting from my buienradar integration. Am I doing something wrong?