Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dudanov committed Jul 16, 2024
1 parent ac405f3 commit 1e10908
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
14 changes: 9 additions & 5 deletions custom_components/ftms/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=UnitOfLength.METERS,
state_class=SensorStateClass.TOTAL,
icon="mdi:map-marker-distance",
icon="mdi:stairs-down",
)

_ELEVATION_GAIN_POSITIVE = SensorEntityDescription(
key=c.ELEVATION_GAIN_POSITIVE,
device_class=SensorDeviceClass.DISTANCE,
native_unit_of_measurement=UnitOfLength.METERS,
state_class=SensorStateClass.TOTAL,
icon="mdi:map-marker-distance",
icon="mdi:stairs-up",
)

_ENERGY_PER_HOUR = SensorEntityDescription(
Expand Down Expand Up @@ -89,7 +89,7 @@

_INCLINATION = SensorEntityDescription(
key=c.INCLINATION,
icon="mdi:heart-pulse",
icon="mdi:angle-acute",
native_unit_of_measurement="%",
state_class=SensorStateClass.MEASUREMENT,
)
Expand All @@ -103,7 +103,7 @@

_MOVEMENT_DIRECTION = SensorEntityDescription(
key=c.MOVEMENT_DIRECTION,
icon="mdi:heart-pulse",
icon="mdi:swap-horizontal-bold",
device_class=SensorDeviceClass.ENUM,
options=["forward", "backward"],
)
Expand All @@ -113,13 +113,15 @@
device_class=SensorDeviceClass.SPEED,
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:run",
)

_PACE_INSTANT = SensorEntityDescription(
key=c.PACE_INSTANT,
device_class=SensorDeviceClass.SPEED,
native_unit_of_measurement=UnitOfSpeed.KILOMETERS_PER_HOUR,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:run",
)

_POWER_AVERAGE = SensorEntityDescription(
Expand Down Expand Up @@ -174,13 +176,15 @@
device_class=SensorDeviceClass.DURATION,
native_unit_of_measurement=UnitOfTime.SECONDS,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:rowing",
)

_SPLIT_TIME_INSTANT = SensorEntityDescription(
key=c.SPLIT_TIME_INSTANT,
device_class=SensorDeviceClass.DURATION,
native_unit_of_measurement=UnitOfTime.SECONDS,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:rowing",
)

_STEP_RATE_AVERAGE = SensorEntityDescription(
Expand Down Expand Up @@ -238,7 +242,7 @@
device_class=SensorDeviceClass.DURATION,
native_unit_of_measurement=UnitOfTime.SECONDS,
state_class=SensorStateClass.TOTAL,
icon="mdi:timer-play",
icon="mdi:timer-stop",
)

_ENTITIES = {
Expand Down
6 changes: 6 additions & 0 deletions custom_components/ftms/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
"speed_instant": {
"name": "Speed"
},
"split_time_average": {
"name": "Average split time"
},
"split_time_instant": {
"name": "Split time"
},
"step_count": {
"name": "Step count"
},
Expand Down
6 changes: 6 additions & 0 deletions custom_components/ftms/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@
"speed_instant": {
"name": "Скорость"
},
"split_time_average": {
"name": "Средний темп гребли"
},
"split_time_instant": {
"name": "Темп гребли"
},
"step_count": {
"name": "Шаги"
},
Expand Down

0 comments on commit 1e10908

Please sign in to comment.