Skip to content

Commit

Permalink
Fix unhandled exception with thermal perception sensor (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
bachya authored Jul 21, 2022
1 parent 8353eef commit 03e4df1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ecowitt2mqtt/helpers/calculator/meteo.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class ThermalPerceptionRating:
),
ThermalPerceptionRating(
perception=ThermalPerception.COMFORTABLE,
minimum_c=13.0,
minimum_c=12.0,
maximum_c=16.0,
),
ThermalPerceptionRating(
Expand All @@ -223,8 +223,8 @@ class ThermalPerceptionRating:
),
ThermalPerceptionRating(
perception=ThermalPerception.DRY,
maximum_c=10.0,
minimum_c=-100.0,
maximum_c=10.0,
),
]

Expand Down Expand Up @@ -697,6 +697,9 @@ def calculate_thermal_perception(
temp_obj = _get_temperature_object(temperature, ecowitt.config.input_unit_system)
dew_point_obj = meteocalc.dew_point(temp_obj, relative_humidity)

print(f"DEW POINT: {dew_point_obj.c}")
print(f"{12.0}")

[rating] = [
r
for r in THERMAL_PERCEPTION_RATINGS
Expand Down

0 comments on commit 03e4df1

Please sign in to comment.