Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #545 from Thomas55555/Thomas55555-patch-1
Browse files Browse the repository at this point in the history
Fix UnitOfLength
  • Loading branch information
Thomas55555 authored Sep 15, 2023
2 parents 950af00 + fca2b5a commit 21cb299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/husqvarna_automower/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PERCENTAGE, UnitOfTime, UnitofLength
from homeassistant.const import PERCENTAGE, UnitOfLength, UnitOfTime
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
Expand Down Expand Up @@ -262,7 +262,7 @@ def problem_list() -> list:
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.TOTAL_INCREASING,
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=UnitOfTime.METERS,
native_unit_of_measurement=UnitOfLength.METERS,
value_fn=lambda data: data["statistics"]["totalDriveDistance"],
available_fn=lambda data: True,
),
Expand Down

0 comments on commit 21cb299

Please sign in to comment.