Set the correct state class for Eve Energy in homekit_controller (#81255)

pull/81268/head
Jc2k 2022-10-30 15:32:19 +00:00 committed by GitHub
parent d5a46c3a10
commit eb76f9b3cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = {
key=CharacteristicsTypes.VENDOR_EVE_ENERGY_KW_HOUR,
name="Energy kWh",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.MEASUREMENT,
state_class=SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
),
CharacteristicsTypes.VENDOR_EVE_ENERGY_VOLTAGE: HomeKitSensorEntityDescription(

View File

@ -70,7 +70,7 @@ async def test_eve_energy_setup(hass):
entity_id="sensor.eve_energy_50ff_energy_kwh",
unique_id="00:00:00:00:00:00_1_28_35",
friendly_name="Eve Energy 50FF Energy kWh",
capabilities={"state_class": SensorStateClass.MEASUREMENT},
capabilities={"state_class": SensorStateClass.TOTAL_INCREASING},
unit_of_measurement=ENERGY_KILO_WATT_HOUR,
state="0.28999999165535",
),