Skip to content

Commit

Permalink
Merge pull request #17 from zestysoft/round_usd_values
Browse files Browse the repository at this point in the history
round usd values
  • Loading branch information
zestysoft authored Nov 27, 2024
2 parents dcd8195 + becda85 commit 63f888e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/sensus_analytics/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "sensus_analytics",
"name": "Sensus Analytics Integration",
"version": "1.3.2",
"version": "1.3.3",
"documentation": "https://github.com/zestysoft/sensus_analytics_integration",
"dependencies": [],
"codeowners": ["@zestysoft"],
Expand Down
4 changes: 2 additions & 2 deletions custom_components/sensus_analytics/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def _calculate_cost(self, usage_gallons):
+ (usage_gallons - tier1_gallons - tier2_gallons) * tier3_price
)
self._attr_native_unit_of_measurement = "USD"
return cost
return round(cost, 2)


class SensusAnalyticsDailyFeeSensor(SensusAnalyticsSensorBase):
Expand Down Expand Up @@ -358,4 +358,4 @@ def _calculate_daily_fee(self, usage_gallons):
+ (usage_gallons - tier1_gallons - tier2_gallons) * tier3_price
)
self._attr_native_unit_of_measurement = "USD"
return cost
return round(cost, 2)

0 comments on commit 63f888e

Please sign in to comment.