Skip to content

Commit

Permalink
Fix Precipitation Accumulation Units
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofghosts authored Jan 3, 2024
1 parent a82cc75 commit 895d76d
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 @@ -972,12 +972,12 @@ def get_state(self, data):
]:
state = ((state * 9 / 5) + 32)

# Precipitation Accumilation (cm in SI) to inches
# Precipitation Accumilation (mm in SI) to inches
if self.requestUnits in ["us"]:
if self.type in [
"precip_accumulation",
]:
state = (state * 0.393701)
state = (state * 0.0393701)

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

0 comments on commit 895d76d

Please sign in to comment.