mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Add icon translations to GPSd (#108602)
This commit is contained in:
parent
a075accbe3
commit
421e276185
13
homeassistant/components/gpsd/icons.json
Normal file
13
homeassistant/components/gpsd/icons.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"mode": {
|
||||||
|
"default": "mdi:crosshairs",
|
||||||
|
"state": {
|
||||||
|
"2d_fix": "mdi:crosshairs-gps",
|
||||||
|
"3d_fix": "mdi:crosshairs-gps"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -144,12 +144,3 @@ 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