kloggy / HA-Irrigation-Version2

225 stars 55 forks source link

Couple of quick questions #42

Open davewatson91 opened 3 years ago

davewatson91 commented 3 years ago

Hi again @kloggy !

Just a couple of questions about how you've got this setup...

What was the reason behind having a 'rainfall yesterday' sensor? (rather than calculating it like temp).. It makes it a little less universal is all (as a lot of systems don't have 'yesterdays rainfall' as a sensor).

Also, have you considered setting this up as a custom-repo for HACS?

Just gauging if it's worth me putting any effort into either :)

kloggy commented 3 years ago

"What was the reason behind having a 'rainfall yesterday' sensor? (rather than calculating it like temp).. It makes it a little less universal is all (as a lot of systems don't have 'yesterdays rainfall' as a sensor)."

To be honest I don't know the answer to this off the top of my head! As I've said before I have never actually used the weather adjustments, so really, I just wrote it and forgot it.

It is an area that could be revisited though as HA now has several new weather integrations. I'll think about it when I get time. (I'm currently evaluating what to use in my whole config as I have been quite reliant on DarkSky)

And as far as a custom-repo for HACS.... That would be nice but I wouldn't know where to start. Feel free to look into it! But does HACS work with yaml packages? I thought it was only for custom components in Python.

davewatson91 commented 3 years ago

You may be quite right about the HACs piece.

I might put together a pull-request to automatically roll the daily rainfall into the next day (rather than relying on an external 'previous-day sensor'). I think that will be more universal for any setup regardless... For the weather sensors, it's not too far from being generic currently. I'm passing in my temperature sensors without an issue at all (from my personal weather station), and my single day rainfall works, I just don't get the roll-over to the next days..

kloggy commented 3 years ago

I think I remember why I did it this way... I found rainfall data for 'today' was always unreliable or hard to get and where it was provided the meaning of the data provided was often ambiguous. I decided that rolling over 'todays' figure would propagate any inaccuracies or errors whereas a clear and obvious figure for 'yesterday' wouldn't.

I discovered Smartweather which negated all this but not until after I'd written it.

With a reliable 'today' figure from, for example, a private weather station (which is effectively what Smartweather provides access to) then yes there is no need for the extra sensor.

I would suggest that any change should possibly make the extra sensor optional?