mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Reduce jumping Starlink uptime sensor (#143076)
This commit is contained in:
parent
e6262de5ab
commit
187024367a
@ -113,7 +113,9 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = (
|
|||||||
translation_key="last_boot_time",
|
translation_key="last_boot_time",
|
||||||
device_class=SensorDeviceClass.TIMESTAMP,
|
device_class=SensorDeviceClass.TIMESTAMP,
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
value_fn=lambda data: now() - timedelta(seconds=data.status["uptime"]),
|
value_fn=lambda data: (
|
||||||
|
now() - timedelta(seconds=data.status["uptime"])
|
||||||
|
).replace(microsecond=0),
|
||||||
),
|
),
|
||||||
StarlinkSensorEntityDescription(
|
StarlinkSensorEntityDescription(
|
||||||
key="ping_drop_rate",
|
key="ping_drop_rate",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user