Add Starlink connectivity binary sensor (#133184)

Co-authored-by: David Rapan <david@rapan.cz>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Conor Eager 2025-02-04 02:34:25 +13:00 committed by GitHub
parent 8579456895
commit 34a229af52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -65,6 +65,7 @@ BINARY_SENSORS = [
key="currently_obstructed",
translation_key="currently_obstructed",
device_class=BinarySensorDeviceClass.PROBLEM,
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda data: data.status["currently_obstructed"],
),
StarlinkBinarySensorEntityDescription(
@ -114,4 +115,9 @@ BINARY_SENSORS = [
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda data: data.alert["alert_unexpected_location"],
),
StarlinkBinarySensorEntityDescription(
key="connection",
device_class=BinarySensorDeviceClass.CONNECTIVITY,
value_fn=lambda data: data.status["state"] == "CONNECTED",
),
]