thanks! i created an issue for the bug, the area that confused me is where you have three units listed as excepted by the integration but only two options for how HA is set.
i would change it to something more like this:
thanks! i created an issue for the bug, the area that confused me is where you have three units listed as excepted by the integration but only two options for how HA is set.
i would change it to something more like this:
once you do the conversion on Solar Rad (after the bug is fixed), use Humidity in % not absolute Humidity in g/m3, and set station pressure to PSI. you should be all set. assuming your your home assistant is set to US imperial units.
New release has been created with the fix for unit conversion of Solar Rad sensor. try it with the other suggestions i made about your units and you should see a better evap value. @jeroenterheerdt mine appears to be working now. thanks!
well, ehmm, 1 mbar = 1 hPa so in reality there are two “units”.
doh, your right. i didnt even check that.
Tempest doesn’t give a PSI option, I can choose from Millibar, Inches of Mercury, Millimeters of Mercury, or Hectopascals. Is there someway to have HA convert from one of those to PSI?
Nevermind, I figured it out. If anyone else needs help, add this to your Configuration.yaml.
sensor:
#Convert Barometric Pressure InHG to PSI (1 InHg = 0.491154 PSI)
- platform: template
sensors:
barometric_pressure_psi:
unit_of_measurement: "PSI"
value_template: >
{{ ((states('sensor.weatherflow_barometric_pressure') | float(0) * 0.491154) * 1.0) | round(2) }}
friendly_name: "Barometric Pressure PSI"
icon_template: mdi:thermometer-lines
device_class: atmospheric_pressure
I have 2 instances of the integration installed using the same settings, and using my Ambient weather station sensors results in excessive daily run times as compared to using OWM as the source.
I think I’ve narrowed it down to the evapotransportation sensor, which is currently at 3.94 for the Ambient sensors and 0.24 for the OWM instance. This results in a huge Water Budget difference (2,461.3 vs 115.1) and an hourly run time of 9,442 seconds using my Ambient sensors vs 435 seconds for OWM! The Base Schedule Index for both instances have the same values. I do have a solar radiation sensor on the weather station, but the mis-match occurs even if both instances use the option to ‘Estimate solar radiation from temperature’. I’ve uninstalled the OWM integration to confirm it’s using the correct GPS coordinates. How can I determine if there’s something I’m doing wrong or if it’s a bug?
Update: I’m still not sure why those values were so far apart, but after several hours the instance that was using my own sensors dropped to closely match what the OWM instance shows.
Hey, thanks for checking in. Assuming you’ve set up the same throughput and size then of course BSI is the same across the two instances.
All I can say is, I think one of your instances reported excessive values for a bit which then mellowed out. One of the reasons we do a hourly update instead of once a day.
I think that is the case. I’ve got several notifications set up in Node Red now to alert me any time any of the hourly/daily sensors change so I can monitor it.
I keep re-reading the documentation to understand how it works. I especially like the _start event to run automations in the early morning to avoid watering at night. Also the example of using both hourly and daily runtime to avoid watering if there’s expected to be precip today. I’m using your integration in conjunction with several in-ground moisture sensors: My goal is to use your Smart Irrigation to maintain the watering levels, and use the moisture sensors to make sure the level never drops above or below optimal soil moisture levels.
You’ve done a GREAT job with this and I hope you continue to maintain/update it!
Thanks!
Thanks! I am actually working on a 2.0 version which will have an actual panel, multizone support, multi calculation module support (ie OWM pyeto, sensor pass through, static et, alternative et calculation methods) and all around easier editing / testing / troubleshooting… Stay tuned
@jeroenterheerdt First of all, thank you very much for this great project! I have set everything up with OWM only in lack of sensors (they are in the works) for now and I had a particular thing happening today morning.
I have the automation configured as per the 3rd example provided on your Wiki (ie. check daily and hourly runtime before initiating irrigation)
We had a pretty significant shower throughout the night (over 50mm as per various meteorological websites covering my country/region), so I was quite surprised to see that the automation triggered in the morning.
For reference, this is today’s history - you see, the hourly runtime went up for some reason at 6 AM, when the automation is otherwise scheduled to trigger:
The OWM Rainn sensor from the same day - now granted, this Rain sensor only shows the rainfall in the last hour as it is described in the OWM integration documentation, but for this purpose it’s great, as it shows the historical data after midnight / dawn.
Moreover, I am not sure where the value “Rain 4.1” comes from as an attribute in the Hourly Adjusted Run Time sensor. Is it taken from the OWM Precipitation Forecast sensor?
It never looks at forecasts and your situation is an unfortunate by product of that. Version 2 is in the works (80% there) which should give you more insight and more control over what is happening to tune it to your situation.
Thanks a lot for the quick reply! Not sure if I could formulate myself properly; looks like the issue is not with not taking into account the forecast (ie. potential rainfall in the future), but not accounting for rain that has already fallen. My intention would not be to get into probability calculations, but to take into account historical data that is already confirmed, if that makes sense.
Where is the “Rain” attribute taking the data from in the Hourly Adjusted Run Time sensor inn case the integration is configured with OWM data alone?
Sorry, just wanted to come back on this - it looks like that it is indeed taking into consideration the forecasted precipitation rather than historical data…ät least when you set it up with OWM only.
Hi,
I have a question about evapotranspiration references and the water budget attribute calculated from them. Are they only for reference and the calculated run time does not depend on them in any case?
Is anyone else having issues connecting to OWM? I’m getting this in my error log and my Hourly Adjusted Runtime entity says “Unavailable”
2023-08-06 23:32:00.616 WARNING (SyncWorker_5) [custom_components.smart_irrigation.OWMClient] Cannot talk to OWM API, check API key.
2023-08-06 23:32:00.623 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform smart_irrigation
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 750, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 557, in state
self._state = self.update_state()
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 366, in update_state
data = self.coordinator.data["daily"][0]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
2023-08-06 23:32:00.627 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1133, in _async_registry_updated
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 557, in state
self._state = self.update_state()
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 366, in update_state
data = self.coordinator.data["daily"][0]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
2023-08-06 23:32:00.628 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1133, in _async_registry_updated
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 557, in state
self._state = self.update_state()
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 366, in update_state
data = self.coordinator.data["daily"][0]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
2023-08-06 23:32:00.629 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up smart_irrigation platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 370, in _async_setup_platform
await asyncio.gather(*pending)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 750, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 746, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 808, in _async_write_ha_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 752, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 557, in state
self._state = self.update_state()
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/smart_irrigation/sensor.py", line 366, in update_state
data = self.coordinator.data["daily"][0]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
I’d prefer to just be done with OWM, but my Tempest weather station doesn’t give me max and min temperatures. Is there a way to get HA to calculate that using the temperature sensor on the Tempest? Is the integration looking for the max and min temps in a single 24 hour day? Or in a 24 hour period?
It looks at daily forecasts only, though.
The answer is: “No, they are not just for reference”. Please see the Wiki for the exact formulas: How this component works · jeroenterheerdt/HAsmartirrigation Wiki · GitHub
I made a component specifically for this See: GitHub - jeroenterheerdt/HADailySensor: Sensor for Home Assistant that gets reset at midnight. You can define max/min temp sensors this way and pass them into your Smart Irrigation config