mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Add icon to GPSD (#100347)
This commit is contained in:
parent
923d945267
commit
840d881c25
@ -121,3 +121,12 @@ class GpsdSensor(SensorEntity):
|
|||||||
ATTR_CLIMB: self.agps_thread.data_stream.climb,
|
ATTR_CLIMB: self.agps_thread.data_stream.climb,
|
||||||
ATTR_MODE: self.agps_thread.data_stream.mode,
|
ATTR_MODE: self.agps_thread.data_stream.mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def icon(self) -> str:
|
||||||
|
"""Return the icon of the sensor."""
|
||||||
|
mode = self.agps_thread.data_stream.mode
|
||||||
|
|
||||||
|
if isinstance(mode, int) and mode >= 2:
|
||||||
|
return "mdi:crosshairs-gps"
|
||||||
|
return "mdi:crosshairs"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user