Add icon translations to GPSd (#108602)

pull/109294/head
Jan Rieger 2024-02-01 08:58:32 +01:00 committed by GitHub
parent a075accbe3
commit 421e276185
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 9 deletions

View File

@ -0,0 +1,13 @@
{
"entity": {
"sensor": {
"mode": {
"default": "mdi:crosshairs",
"state": {
"2d_fix": "mdi:crosshairs-gps",
"3d_fix": "mdi:crosshairs-gps"
}
}
}
}
}

View File

@ -144,12 +144,3 @@ class GpsdSensor(SensorEntity):
ATTR_CLIMB: self.agps_thread.data_stream.climb,
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"