Skip to content

Commit

Permalink
Fix Imperial Precipitation Accumulation (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
mammbo3 authored Nov 20, 2024
1 parent 2c74793 commit 7daf8be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/pirateweather/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ def get_state(self, data):
]:
state = round(state * 9 / 5) + 32

# Precipitation Accumilation (cm in SI) to inches
# Precipitation Accumulation (cm in SI) to inches
if self.requestUnits in ["us"]:
if self.type in [
"precip_accumulation",
Expand All @@ -1231,7 +1231,7 @@ def get_state(self, data):
"current_day_snow",
"current_day_ice",
]:
state = state * 0.0393701
state = state * 0.3937008

# Precipitation Intensity (mm/h in SI) to inches
if self.requestUnits in ["us"]:
Expand Down

0 comments on commit 7daf8be

Please sign in to comment.