jeroenterheerdt / HAsmartirrigation

Smart Irrigation custom component for Home Assistant
https://jeroenterheerdt.github.io/HAsmartirrigation/
MIT License
367 stars 49 forks source link

daily sensors not updated? #25

Closed posixx closed 4 years ago

posixx commented 4 years ago

Ok i have re-added the integrations after v0.0.20. This was around 22 hours i think. At 23h the daily sensor should update right?

image

But they stay at 0. Do i need to wait a day for these to get updated? Or is this a bug/issue..

jeroenterheerdt commented 4 years ago

is auto refresh enabled?

posixx commented 4 years ago

Yes and the time is on 23:00


From: Jeroen ter Heerdt notifications@github.com Sent: Thursday, May 28, 2020 11:46:57 PM To: jeroenterheerdt/HAsmartirrigation HAsmartirrigation@noreply.github.com Cc: Frans Rampen Frans.Rampen@yoda-ict.nl; Author author@noreply.github.com Subject: Re: [jeroenterheerdt/HAsmartirrigation] daily sensors not updated? (#25)

is auto refresh enabled?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jeroenterheerdt/HAsmartirrigation/issues/25#issuecomment-635625759, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARMXUGHPD4IC6QWKPAJR6TRT3LVDANCNFSM4NNOLH7Q.

jeroenterheerdt commented 4 years ago

found the bug, will release v0.0.21 soon. please test that and confirm/close.

posixx commented 4 years ago

Nope doesn't work.

2020-05-29 23:00:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/smart_irrigation/init.py", line 327, in _async_update_last_of_day self._update_last_of_day() File "/config/custom_components/smart_irrigation/init.py", line 316, in _update_last_of_day self.bucket = self.bucket + bucket_delta TypeError: can only concatenate str (not "float") to str 2020-05-29 23:00:00 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/config/custom_components/smart_irrigation/init.py", line 327, in _async_update_last_of_day self._update_last_of_day() File "/config/custom_components/smart_irrigation/init.py", line 316, in _update_last_of_day self.bucket = self.bucket + bucket_delta TypeError: can only concatenate str (not "float") to str

jeroenterheerdt commented 4 years ago

can you provide the bucket value before this error happens?

posixx commented 4 years ago

It is and was 0:

image

jeroenterheerdt commented 4 years ago

ok, one more screenshot: can you share the value of netto precipitation as well?

posixx commented 4 years ago

daily sensors:

image

base sensors:

image

jeroenterheerdt commented 4 years ago

not sure what is going on here, I will be providing you a new version that has more logging. You should see an INFO entry in the log saying: "Updating bucket [value] with netto_precipitation: [value]". Can you provide me with that once you've seen it?

posixx commented 4 years ago

no problem, can i trigger manually? Of do i have to wait about 24hr

jeroenterheerdt commented 4 years ago

you can trigger it manually.

jeroenterheerdt commented 4 years ago

please test using v0.0.22

posixx commented 4 years ago

Ok,, as the sensor names are changed, should i remove integrations, reboot and re-add? It;s 1 AM here now so will do this tomorrow.

jeroenterheerdt commented 4 years ago

I would remove, readd. that should take care of it. oh and go to sleep :)

posixx commented 4 years ago

Ok implemented new version. Now when calling smart_irrigation.voortuin_calculate_daily_adjusted_run_time it works:

image

Calling smart_irrigation.voortuin_reset_bucket resets the daily values. So this looks good!

From the core log:

2020-05-30 12:54:00 INFO (MainThread) [custom_components.smart_irrigation] Calculate Daily Adjusted Run Time service called, calculating now. 2020-05-30 12:54:00 INFO (MainThread) [custom_components.smart_irrigation] Updating bucket: 0.0 with netto_precipitation: -8.770122066475068 2020-05-30 12:54:22 INFO (MainThread) [custom_components.smart_irrigation] Updating Smart Irrigation Data 2020-05-30 12:54:22 INFO (MainThread) [custom_components.smart_irrigation] Updating Smart Irrigation Data 2020-05-30 12:54:22 INFO (MainThread) [custom_components.smart_irrigation.sensor] rain: 0.0, snow: 0.0 2020-05-30 12:54:22 INFO (MainThread) [custom_components.smart_irrigation.sensor] rain: 0.0, snow: 0.0 2020-05-30 12:54:22 INFO (MainThread) [custom_components.smart_irrigation.sensor] rain: 0.0, snow: 0.0 2020-05-30 12:54:22 INFO (MainThread) [custom_components.smart_irrigation.sensor] rain: 0.0, snow: 0.0 2020-05-30 12:55:02 INFO (SyncWorker_18) [custom_components.smart_irrigation] Reset bucket service called, resetting bucket to 0.

Let's see if it also works tonight at 23:00

posixx commented 4 years ago

Also on 23h it worked last night. So solved!

jeroenterheerdt commented 4 years ago

Thanks!