From ea2b245018686dca68553983e4333db6c6ac4f9d Mon Sep 17 00:00:00 2001 From: Tijs Verkoyen Date: Mon, 8 Jan 2024 17:49:23 +0100 Subject: [PATCH] Remove deprecated usage of IRRADIATION_WATTS_PER_SQUARE_METER --- .../fusion_solar/fusion_solar/year_plant_data_entity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/fusion_solar/fusion_solar/year_plant_data_entity.py b/custom_components/fusion_solar/fusion_solar/year_plant_data_entity.py index 029d25c..a6e8dc4 100644 --- a/custom_components/fusion_solar/fusion_solar/year_plant_data_entity.py +++ b/custom_components/fusion_solar/fusion_solar/year_plant_data_entity.py @@ -2,7 +2,7 @@ from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.components.sensor import SensorEntity, SensorDeviceClass, SensorStateClass -from homeassistant.const import UnitOfEnergy, UnitOfPower, UnitOfMass, IRRADIATION_WATTS_PER_SQUARE_METER +from homeassistant.const import UnitOfEnergy, UnitOfPower, UnitOfMass, UnitOfIrradiance from ..const import DOMAIN @@ -87,7 +87,7 @@ def device_class(self) -> str: @property def native_unit_of_measurement(self) -> str: - return IRRADIATION_WATTS_PER_SQUARE_METER + return UnitOfIrradiance.WATTS_PER_SQUARE_METER @property def state_class(self) -> str: