From 448756523218f994a84f428270bde2f8aa27d141 Mon Sep 17 00:00:00 2001 From: Robert Delpeut Date: Sun, 28 Mar 2021 16:37:27 +0200 Subject: [PATCH] Add dsmr monthly and yearly totals (#48253) Co-authored-by: Martin Hjelmare --- .../components/dsmr_reader/definitions.py | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) diff --git a/homeassistant/components/dsmr_reader/definitions.py b/homeassistant/components/dsmr_reader/definitions.py index 309f0d297ec..daf6b9eb950 100644 --- a/homeassistant/components/dsmr_reader/definitions.py +++ b/homeassistant/components/dsmr_reader/definitions.py @@ -325,4 +325,160 @@ DEFINITIONS = { "enable_default": True, "icon": "mdi:flash", }, + "dsmr/current-month/electricity1": { + "name": "Current month low tariff usage", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-month/electricity2": { + "name": "Current month high tariff usage", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-month/electricity1_returned": { + "name": "Current month low tariff returned", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-month/electricity2_returned": { + "name": "Current month high tariff returned", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-month/electricity_merged": { + "name": "Current month power usage total", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-month/electricity_returned_merged": { + "name": "Current month power return total", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-month/electricity1_cost": { + "name": "Current month low tariff cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-month/electricity2_cost": { + "name": "Current month high tariff cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-month/electricity_cost_merged": { + "name": "Current month power total cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-month/gas": { + "name": "Current month gas usage", + "enable_default": True, + "icon": "mdi:counter", + "unit": VOLUME_CUBIC_METERS, + }, + "dsmr/current-month/gas_cost": { + "name": "Current month gas cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-month/fixed_cost": { + "name": "Current month fixed cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-month/total_cost": { + "name": "Current month total cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-year/electricity1": { + "name": "Current year low tariff usage", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-year/electricity2": { + "name": "Current year high tariff usage", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-year/electricity1_returned": { + "name": "Current year low tariff returned", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-year/electricity2_returned": { + "name": "Current year high tariff usage", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-year/electricity_merged": { + "name": "Current year power usage total", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-year/electricity_returned_merged": { + "name": "Current year power returned total", + "enable_default": True, + "device_class": DEVICE_CLASS_ENERGY, + "unit": ENERGY_KILO_WATT_HOUR, + }, + "dsmr/current-year/electricity1_cost": { + "name": "Current year low tariff cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-year/electricity2_cost": { + "name": "Current year high tariff cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-year/electricity_cost_merged": { + "name": "Current year power total cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-year/gas": { + "name": "Current year gas usage", + "enable_default": True, + "icon": "mdi:counter", + "unit": VOLUME_CUBIC_METERS, + }, + "dsmr/current-year/gas_cost": { + "name": "Current year gas cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-year/fixed_cost": { + "name": "Current year fixed cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, + "dsmr/current-year/total_cost": { + "name": "Current year total cost", + "enable_default": True, + "icon": "mdi:currency-eur", + "unit": CURRENCY_EURO, + }, }