Disable some less commonly used starlink entities by default (#87869)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Jack Boswell 2023-03-10 01:06:27 +13:00 committed by GitHub
parent b0631fed1d
commit c6d2824afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
entity_registry_enabled_default=False,
value_fn=lambda data: round(data.status["direction_azimuth"]), value_fn=lambda data: round(data.status["direction_azimuth"]),
), ),
StarlinkSensorEntityDescription( StarlinkSensorEntityDescription(
@ -84,6 +85,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = (
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
entity_category=EntityCategory.DIAGNOSTIC, entity_category=EntityCategory.DIAGNOSTIC,
native_unit_of_measurement=DEGREE, native_unit_of_measurement=DEGREE,
entity_registry_enabled_default=False,
value_fn=lambda data: round(data.status["direction_elevation"]), value_fn=lambda data: round(data.status["direction_elevation"]),
), ),
StarlinkSensorEntityDescription( StarlinkSensorEntityDescription(
@ -91,6 +93,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = (
name="Uplink throughput", name="Uplink throughput",
icon="mdi:upload", icon="mdi:upload",
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.DATA_RATE,
native_unit_of_measurement=UnitOfDataRate.BITS_PER_SECOND, native_unit_of_measurement=UnitOfDataRate.BITS_PER_SECOND,
value_fn=lambda data: round(data.status["uplink_throughput_bps"]), value_fn=lambda data: round(data.status["uplink_throughput_bps"]),
), ),
@ -99,6 +102,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = (
name="Downlink throughput", name="Downlink throughput",
icon="mdi:download", icon="mdi:download",
state_class=SensorStateClass.MEASUREMENT, state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.DATA_RATE,
native_unit_of_measurement=UnitOfDataRate.BITS_PER_SECOND, native_unit_of_measurement=UnitOfDataRate.BITS_PER_SECOND,
value_fn=lambda data: round(data.status["downlink_throughput_bps"]), value_fn=lambda data: round(data.status["downlink_throughput_bps"]),
), ),