diff --git a/CHANGELOG.md b/CHANGELOG.md index ca540ff..1822618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.2.0] - 2021-08-11 +### Added +- Added last 24h and last 30 days energy used in KWh to the attributes + ## [0.1.10] - 2021-08-10 ### Changed - Removed "Setting up State Class" error message used for testing diff --git a/README.md b/README.md index 93cf824..e2b0362 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ template: unit_of_measurement: '°C' state: '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' # Manual adjustment of -3°C in case the temp sensor is high than real temperature device_class: temperature - state_class: measurement + state_class: measurement # Add state_class: measurement for long term statistics are required - sensor: - name: "CurrentCost Power" unit_of_measurement: 'W' @@ -73,6 +73,11 @@ template: state: '{{ state_attr("sensor.current_cost", "Appliance 2") }}' device_class: power state_class: measurement + - sensor: + - name: "Total Energy Used Last 24h" # Note: this data is published by the Current Cost device every 2h + unit_of_measurement: 'KWh' + state: '{{ state_attr("sensor.current_cost", "Appliance 0 Last 24h") }}' + device_class: energy ``` diff --git a/custom_components/currentcost/manifest.json b/custom_components/currentcost/manifest.json index 046980d..d542978 100644 --- a/custom_components/currentcost/manifest.json +++ b/custom_components/currentcost/manifest.json @@ -1,7 +1,7 @@ { "domain": "currentcost", "name": "Current Cost", - "version": "0.1.9", + "version": "0.2.0", "documentation": "https://github.com/lolouk44/CurrentCost_HA_CC", "requirements": [ "pyserial-asyncio==0.4", diff --git a/info.md b/info.md index eafcbe2..a4c2072 100644 --- a/info.md +++ b/info.md @@ -26,7 +26,7 @@ template: unit_of_measurement: '°C' state: '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' # Manual adjustment of -3°C in case the temp sensor is high than real temperature device_class: temperature - state_class: measurement + state_class: measurement # Add state_class: measurement for long term statistics are required - sensor: - name: "CurrentCost Power" unit_of_measurement: 'W' @@ -39,6 +39,11 @@ template: state: '{{ state_attr("sensor.current_cost", "Appliance 2") }}' device_class: power state_class: measurement + - sensor: + - name: "Total Energy Used Last 24h" # Note: this data is published by the Current Cost device every 2h + unit_of_measurement: 'KWh' + state: '{{ state_attr("sensor.current_cost", "Appliance 0 Last 24h") }}' + device_class: energy ``` {% if installed %}