From 75ffc8894515ce9ae73a13bf708baa12a34100f2 Mon Sep 17 00:00:00 2001 From: Dan Raper Date: Mon, 25 Mar 2024 12:58:01 +0100 Subject: [PATCH] Energy sensor fix and docs update (#68) * Update password reset instructions * Change energy sensor to total_increasing * Version bump * Added note for energy sensor to README --- README.md | 2 +- custom_components/ohme/const.py | 2 +- custom_components/ohme/sensor.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0d0afc1..eeffbfe 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ This integration exposes the following entities: * Next Charge Slot End - The next time your car will stop charging according to the Ohme-generated charge plan * Sensors (Other) * CT Reading (Amps) - Reading from attached CT clamp - * Session Energy Usage (kWh) - Energy used in the current session + * Session Energy Usage (kWh) - Energy used in the current session. *This is supported by the energy dashboard.* * Accumulative Energy Usage (kWh) - Total energy used by the charger (If enabled in options) * Battery State of Charge (%) - If your car is API connected this is read from the car, if not it is how much charge Ohme thinks it has added * Switches (Settings) - **Only options available to your charger model will show** diff --git a/custom_components/ohme/const.py b/custom_components/ohme/const.py index f0ddced..2a82f33 100644 --- a/custom_components/ohme/const.py +++ b/custom_components/ohme/const.py @@ -1,7 +1,7 @@ """Component constants""" DOMAIN = "ohme" USER_AGENT = "dan-r-homeassistant-ohme" -INTEGRATION_VERSION = "0.7.1" +INTEGRATION_VERSION = "0.7.2" CONFIG_VERSION = 1 ENTITY_TYPES = ["sensor", "binary_sensor", "switch", "button", "number", "time"] diff --git a/custom_components/ohme/sensor.py b/custom_components/ohme/sensor.py index 8d0868d..ba091f5 100644 --- a/custom_components/ohme/sensor.py +++ b/custom_components/ohme/sensor.py @@ -268,7 +268,7 @@ class EnergyUsageSensor(CoordinatorEntity[OhmeChargeSessionsCoordinator], Sensor _attr_suggested_unit_of_measurement = UnitOfEnergy.KILO_WATT_HOUR _attr_suggested_display_precision = 1 _attr_device_class = SensorDeviceClass.ENERGY - _attr_state_class = SensorStateClass.TOTAL + _attr_state_class = SensorStateClass.TOTAL_INCREASING def __init__( self,