From c6d2824afef9b8af9be923030c1b0c405a498b15 Mon Sep 17 00:00:00 2001 From: Jack Boswell Date: Fri, 10 Mar 2023 01:06:27 +1300 Subject: [PATCH] Disable some less commonly used starlink entities by default (#87869) Co-authored-by: J. Nick Koston --- homeassistant/components/starlink/sensor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/starlink/sensor.py b/homeassistant/components/starlink/sensor.py index af745c6f155..bb84f032242 100644 --- a/homeassistant/components/starlink/sensor.py +++ b/homeassistant/components/starlink/sensor.py @@ -75,6 +75,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = ( state_class=SensorStateClass.MEASUREMENT, entity_category=EntityCategory.DIAGNOSTIC, native_unit_of_measurement=DEGREE, + entity_registry_enabled_default=False, value_fn=lambda data: round(data.status["direction_azimuth"]), ), StarlinkSensorEntityDescription( @@ -84,6 +85,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = ( state_class=SensorStateClass.MEASUREMENT, entity_category=EntityCategory.DIAGNOSTIC, native_unit_of_measurement=DEGREE, + entity_registry_enabled_default=False, value_fn=lambda data: round(data.status["direction_elevation"]), ), StarlinkSensorEntityDescription( @@ -91,6 +93,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = ( name="Uplink throughput", icon="mdi:upload", state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.DATA_RATE, native_unit_of_measurement=UnitOfDataRate.BITS_PER_SECOND, value_fn=lambda data: round(data.status["uplink_throughput_bps"]), ), @@ -99,6 +102,7 @@ SENSORS: tuple[StarlinkSensorEntityDescription, ...] = ( name="Downlink throughput", icon="mdi:download", state_class=SensorStateClass.MEASUREMENT, + device_class=SensorDeviceClass.DATA_RATE, native_unit_of_measurement=UnitOfDataRate.BITS_PER_SECOND, value_fn=lambda data: round(data.status["downlink_throughput_bps"]), ),