Skip to content

Commit

Permalink
Merge pull request #16 from zestysoft/fix-usd-units
Browse files Browse the repository at this point in the history
Fix usd units
  • Loading branch information
zestysoft authored Nov 27, 2024
2 parents c31e804 + 5d00483 commit dcd8195
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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.1",
"version": "1.3.2",
"documentation": "https://github.com/zestysoft/sensus_analytics_integration",
"dependencies": [],
"codeowners": ["@zestysoft"],
Expand Down
2 changes: 2 additions & 0 deletions custom_components/sensus_analytics/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ def _calculate_cost(self, usage_gallons):
+ tier2_gallons * tier2_price
+ (usage_gallons - tier1_gallons - tier2_gallons) * tier3_price
)
self._attr_native_unit_of_measurement = "USD"
return cost


Expand Down Expand Up @@ -356,4 +357,5 @@ def _calculate_daily_fee(self, usage_gallons):
+ tier2_gallons * tier2_price
+ (usage_gallons - tier1_gallons - tier2_gallons) * tier3_price
)
self._attr_native_unit_of_measurement = "USD"
return cost

0 comments on commit dcd8195

Please sign in to comment.