Add missing low state for ENUM Tractive sensors (#99057)

* Add missing "low" option

* Use existing translations
This commit is contained in:
Maciej Bieniek 2023-08-28 06:23:26 +00:00 committed by GitHub
parent c686f962b5
commit 579c760f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -176,8 +176,9 @@ SENSOR_TYPES: tuple[TractiveSensorEntityDescription, ...] = (
value_fn=lambda state: state.lower() if isinstance(state, str) else state,
device_class=SensorDeviceClass.ENUM,
options=[
"ok",
"good",
"low",
"ok",
],
),
TractiveSensorEntityDescription(
@ -188,8 +189,9 @@ SENSOR_TYPES: tuple[TractiveSensorEntityDescription, ...] = (
value_fn=lambda state: state.lower() if isinstance(state, str) else state,
device_class=SensorDeviceClass.ENUM,
options=[
"ok",
"good",
"low",
"ok",
],
),
)

View File

@ -33,8 +33,9 @@
"activity": {
"name": "Activity",
"state": {
"ok": "OK",
"good": "Good"
"good": "Good",
"low": "Low",
"ok": "OK"
}
},
"activity_time": {
@ -58,8 +59,9 @@
"sleep": {
"name": "Sleep",
"state": {
"ok": "OK",
"good": "Good"
"good": "[%key:component::tractive::entity::sensor::activity::state::good%]",
"low": "[%key:component::tractive::entity::sensor::activity::state::low%]",
"ok": "[%key:component::tractive::entity::sensor::activity::state::ok%]"
}
},
"tracker_battery_level": {