forked from home-assistant/core
Use None default for traccar server battery level sensor (#118324)
Do not set -1 as default for traccar server battery level
This commit is contained in:
@@ -45,7 +45,7 @@ TRACCAR_SERVER_SENSOR_ENTITY_DESCRIPTIONS: tuple[
|
||||
device_class=SensorDeviceClass.BATTERY,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
suggested_display_precision=0,
|
||||
value_fn=lambda x: x["attributes"].get("batteryLevel", -1),
|
||||
value_fn=lambda x: x["attributes"].get("batteryLevel"),
|
||||
),
|
||||
TraccarServerSensorEntityDescription[PositionModel](
|
||||
key="speed",
|
||||
|
||||
Reference in New Issue
Block a user