Skip to content

Commit

Permalink
Disable some less commonly used starlink entities by default (home-as…
Browse files Browse the repository at this point in the history
…sistant#87869)

Co-authored-by: J. Nick Koston <[email protected]>
  • Loading branch information
boswelja and bdraco authored Mar 9, 2023
1 parent b0631fe commit c6d2824
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions homeassistant/components/starlink/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def native_value(self) -> StateType | datetime:
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(
Expand All @@ -84,13 +85,15 @@ def native_value(self) -> StateType | datetime:
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(
key="uplink_throughput",
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"]),
),
Expand All @@ -99,6 +102,7 @@ def native_value(self) -> StateType | datetime:
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"]),
),
Expand Down

0 comments on commit c6d2824

Please sign in to comment.