Skip to content

Commit

Permalink
Merge pull request #67 from maorcc/add-statstics-config
Browse files Browse the repository at this point in the history
Add total cost per low & rate and sewage consumption
  • Loading branch information
elad-bar committed Jun 2, 2024
2 parents 7b3b1a6 + 16f28cf commit 2460978
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v3.0.1

- Add total cost per low & rate and sewage consumption

## v3.0.0

**Breaking Changes:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ class IntegrationNumberEntityDescription(
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=UnitOfVolume.CUBIC_METERS,
),
IntegrationSensorEntityDescription(
key=EntityKeys.LOW_RATE_TOTAL_COST,
entity_type=EntityType.METER,
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UNIT_COST,
icon="mdi:currency-ils",
),
IntegrationNumberEntityDescription(
key=EntityKeys.LOW_RATE_COST,
entity_type=EntityType.METER,
Expand All @@ -118,6 +126,14 @@ class IntegrationNumberEntityDescription(
native_unit_of_measurement=UNIT_COST,
icon="mdi:currency-ils",
),
IntegrationSensorEntityDescription(
key=EntityKeys.HIGH_RATE_TOTAL_COST,
entity_type=EntityType.METER,
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UNIT_COST,
icon="mdi:currency-ils",
),
IntegrationNumberEntityDescription(
key=EntityKeys.HIGH_RATE_COST,
entity_type=EntityType.METER,
Expand All @@ -129,6 +145,14 @@ class IntegrationNumberEntityDescription(
native_unit_of_measurement=UNIT_COST,
icon="mdi:currency-ils",
),
IntegrationSensorEntityDescription(
key=EntityKeys.SEWAGE_TOTAL_COST,
entity_type=EntityType.METER,
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UNIT_COST,
icon="mdi:currency-ils",
),
IntegrationNumberEntityDescription(
key=EntityKeys.SEWAGE_COST,
entity_type=EntityType.METER,
Expand Down
3 changes: 3 additions & 0 deletions custom_components/citymind_water_meter/common/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ class EntityKeys(StrEnum):
YESTERDAYS_CONSUMPTION = "yesterdays_consumption"
HIGH_RATE_CONSUMPTION = "high_rate_consumption"
LOW_RATE_CONSUMPTION = "low_rate_consumption"
LOW_RATE_TOTAL_COST = "low_rate_total_cost"
LOW_RATE_COST = "low_rate_cost"
HIGH_RATE_TOTAL_COST = "high_rate_total_cost"
HIGH_RATE_COST = "high_rate_cost"
SEWAGE_COST = "sewage_cost"
SEWAGE_TOTAL_COST = "sewage_total_cost"
LOW_RATE_CONSUMPTION_THRESHOLD = "low_rate_consumption_threshold"
ALERTS = "alerts"
ALERT_LEAK_WHILE_AWAY_SMS = "alert_leak_while_away_sms"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/citymind_water_meter/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/maorcc/citymind_water_meter/issues",
"requirements": [],
"version": "3.0.0"
"version": "3.0.1"
}
9 changes: 9 additions & 0 deletions custom_components/citymind_water_meter/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@
},
"alerts": {
"name": "Alert"
},
"low_rate_total_cost": {
"name": "Low Rate Cost"
},
"high_rate_total_cost": {
"name": "High Rate Cost"
},
"sewage_total_cost": {
"name": "Sewage Cost"
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions custom_components/citymind_water_meter/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,24 @@
"high_rate_consumption": {
"name": "High Rate Consumption"
},
"high_rate_total_cost": {
"name": "High Rate Cost"
},
"last_read": {
"name": "Last Read"
},
"low_rate_consumption": {
"name": "Low Rate Consumption"
},
"low_rate_total_cost": {
"name": "Low Rate Cost"
},
"monthly_consumption": {
"name": "Monthly Consumption"
},
"sewage_total_cost": {
"name": "Sewage Cost"
},
"todays_consumption": {
"name": "Today's Consumption"
},
Expand Down
9 changes: 9 additions & 0 deletions custom_components/citymind_water_meter/translations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,24 @@
"high_rate_consumption": {
"name": "\u05e6\u05e8\u05d9\u05db\u05ea \u05e7\u05e6\u05d1 \u05d2\u05d1\u05d5\u05d4\u05d4"
},
"high_rate_total_cost": {
"name": "\u05e2\u05dc\u05d5\u05ea \u05ea\u05e2\u05e8\u05d9\u05e3 \u05d2\u05d1\u05d5\u05d4\u05d4"
},
"last_read": {
"name": "\u05e7\u05e8\u05d0 \u05d0\u05d7\u05e8\u05d5\u05df"
},
"low_rate_consumption": {
"name": "\u05e6\u05e8\u05d9\u05db\u05ea \u05e7\u05e6\u05d1 \u05e0\u05de\u05d5\u05da"
},
"low_rate_total_cost": {
"name": "\u05e2\u05dc\u05d5\u05ea \u05ea\u05e2\u05e8\u05d9\u05e3 \u05e0\u05de\u05d5\u05da"
},
"monthly_consumption": {
"name": "\u05e6\u05e8\u05d9\u05db\u05d4 \u05d7\u05d5\u05d3\u05e9\u05d9\u05ea"
},
"sewage_total_cost": {
"name": "\u05e2\u05dc\u05d5\u05ea \u05d1\u05d9\u05d5\u05d1"
},
"todays_consumption": {
"name": "\u05d4\u05e6\u05e8\u05d9\u05db\u05d4 \u05e9\u05dc \u05d4\u05d9\u05d5\u05dd"
},
Expand Down

0 comments on commit 2460978

Please sign in to comment.