Address Starlink code quality and add update sensor (#86066)

* Use dt.now

* Bring back update binary sensor

* Don't patch coordinator

* Add silver quality scale
This commit is contained in:
Jack Boswell 2023-01-17 21:10:40 +13:00 committed by GitHub
parent 4aba3fdad6
commit ec1b4d5651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 13 deletions

View file

@ -58,6 +58,12 @@ class StarlinkBinarySensorEntity(StarlinkEntity, BinarySensorEntity):
BINARY_SENSORS = [
StarlinkBinarySensorEntityDescription(
key="update",
name="Update available",
device_class=BinarySensorDeviceClass.UPDATE,
value_fn=lambda data: data.alert["alert_install_pending"],
),
StarlinkBinarySensorEntityDescription(
key="roaming",
name="Roaming mode",