Skip to content

Commit

Permalink
fix issue #282 AREA_SQUARE_METERS deprecated pull request #283 from s…
Browse files Browse the repository at this point in the history
…ca075/refactoring_camera

fix issue #282 AREA_SQUARE_METERS deprecated
  • Loading branch information
sca075 authored Nov 28, 2024
2 parents d2ef83b + f018274 commit b4880bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/mqtt_vacuum_camera/sensor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Sensors for Rand256.
Version 2024.11.0
Version 2024.12.0
"""

from __future__ import annotations
Expand All @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b4880bf

Please sign in to comment.