Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dudanov committed Oct 26, 2024
1 parent 6d2ca22 commit 9b63bad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/ftms/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ class FtmsSensorEntity(FtmsEntity, SensorEntity):
def __init__(self, entry, description) -> None:
if description.device_class != SensorDeviceClass.ENUM:
self._attr_native_value = 0
elif description.key == TRAINING_STATUS:
self._attr_native_value = (
entry.runtime_data.ftms.training_status.name.lower()
)

super().__init__(entry, description)

Expand Down

0 comments on commit 9b63bad

Please sign in to comment.