diff --git a/CHANGELOG.md b/CHANGELOG.md index 8dcad23..05244ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v3.0.1 + +- Add total cost per low & rate and sewage consumption + ## v3.0.0 **Breaking Changes:** diff --git a/custom_components/citymind_water_meter/common/entity_descriptions.py b/custom_components/citymind_water_meter/common/entity_descriptions.py index 6e197a9..7ac54c8 100644 --- a/custom_components/citymind_water_meter/common/entity_descriptions.py +++ b/custom_components/citymind_water_meter/common/entity_descriptions.py @@ -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, @@ -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, @@ -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, diff --git a/custom_components/citymind_water_meter/common/enums.py b/custom_components/citymind_water_meter/common/enums.py index 9e7701f..f82c94d 100644 --- a/custom_components/citymind_water_meter/common/enums.py +++ b/custom_components/citymind_water_meter/common/enums.py @@ -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" diff --git a/custom_components/citymind_water_meter/manifest.json b/custom_components/citymind_water_meter/manifest.json index 0887c82..05c5828 100644 --- a/custom_components/citymind_water_meter/manifest.json +++ b/custom_components/citymind_water_meter/manifest.json @@ -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" } diff --git a/custom_components/citymind_water_meter/strings.json b/custom_components/citymind_water_meter/strings.json index 965fd13..5d77f4c 100644 --- a/custom_components/citymind_water_meter/strings.json +++ b/custom_components/citymind_water_meter/strings.json @@ -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" } } } diff --git a/custom_components/citymind_water_meter/translations/en.json b/custom_components/citymind_water_meter/translations/en.json index 0e2dcea..4f19fb9 100644 --- a/custom_components/citymind_water_meter/translations/en.json +++ b/custom_components/citymind_water_meter/translations/en.json @@ -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" }, diff --git a/custom_components/citymind_water_meter/translations/he.json b/custom_components/citymind_water_meter/translations/he.json index 925d7c3..eecaeea 100644 --- a/custom_components/citymind_water_meter/translations/he.json +++ b/custom_components/citymind_water_meter/translations/he.json @@ -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" },