HAsmartirrigation: [Bug] Dew Point Negative Temperature Error

Describe the bug Dew point values that are negative cause an error.

To Reproduce Have a negative dew_point value input.

Expected behavior I’m not familiar with the calculation for evapotranspiration so I cannot say whether a negative dew point is suitable for input. If one is not suitable perhaps we could floor the dew_point value to 0 with inputs <0.

Screenshots I’m not sure a screenshot is helpful, but an excerpt from the error log below.

File "/config/custom_components/smart_irrigation/OWMClient.py", line 61, in get_data
    self.validationError(k,data[k],OWM_validators[k]["min"],OWM_validators[k]["max"])
  File "/config/custom_components/smart_irrigation/OWMClient.py", line 84, in validationError
    raise ValueError("Value {0} is not valid for {1}. Excepted range: {2}-{3}".format(value,key,minval,maxval))
ValueError: Value -5.95 is not valid for dew_point. Excepted range: 0-35
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/config/custom_components/smart_irrigation/__init__.py", line 533, in _async_initial_update
    await self.handle_calculate_hourly_adjusted_run_time(call=None)
  File "/config/custom_components/smart_irrigation/__init__.py", line 406, in handle_calculate_hourly_adjusted_run_time
    self.data = await self._async_update_data()
  File "/config/custom_components/smart_irrigation/__init__.py", line 546, in _async_update_data
    raise UpdateFailed(exception)
homeassistant.helpers.update_coordinator.UpdateFailed: Value -5.95 is not valid for dew_point. Excepted range: 0-35

Installed version 0.74

Additional context Previous versions have not shown the issue and rolling back to previous versions has resolved this issue. I currently use an ecowitt weather vain for most of the inputs to this integration and it generates negative dew point values.

Thanks for a great integration!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

I think at <0 it would be referred to as the frost point rather than the dew point, but I’m not sure that matters for this use case.

Thanks for what you do.