From 3c3b7a9bb5c171492011dedaa18e34fae1c7bb9e Mon Sep 17 00:00:00 2001 From: SCA075 <82227818+sca075@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:08:55 +0100 Subject: [PATCH] fix issue #282 deprecated AREA_SQUARE_METERS Signed-off-by: 82227818+sca075@users.noreply.github.com <82227818+sca075@users.noreply.github.com> --- custom_components/mqtt_vacuum_camera/sensor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/mqtt_vacuum_camera/sensor.py b/custom_components/mqtt_vacuum_camera/sensor.py index 99cd163e..a48f2cfe 100644 --- a/custom_components/mqtt_vacuum_camera/sensor.py +++ b/custom_components/mqtt_vacuum_camera/sensor.py @@ -1,5 +1,5 @@ """Sensors for Rand256. -Version 2024.11.0 +Version 2024.12.0 """ from __future__ import annotations @@ -15,7 +15,7 @@ SensorEntityDescription, SensorStateClass, ) -from homeassistant.const import AREA_SQUARE_METERS, PERCENTAGE, UnitOfTime +from homeassistant.const import PERCENTAGE, UnitOfTime, UnitOfArea from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity import EntityCategory @@ -81,7 +81,7 @@ class VacuumSensorDescription(SensorEntityDescription): entity_category=EntityCategory.DIAGNOSTIC, ), "current_clean_area": VacuumSensorDescription( - native_unit_of_measurement=AREA_SQUARE_METERS, + native_unit_of_measurement=UnitOfArea.SQUARE_METERS, key="currentCleanArea", icon="mdi:texture-box", name="Current clean area", @@ -133,7 +133,7 @@ class VacuumSensorDescription(SensorEntityDescription): entity_category=EntityCategory.DIAGNOSTIC, ), "last_run_area": VacuumSensorDescription( - native_unit_of_measurement=AREA_SQUARE_METERS, + native_unit_of_measurement=UnitOfArea.SQUARE_METERS, key="last_run_area", icon="mdi:texture-box", name="Last run area",