diff --git a/homeassistant/components/gpsd/icons.json b/homeassistant/components/gpsd/icons.json new file mode 100644 index 00000000000..b29640e0001 --- /dev/null +++ b/homeassistant/components/gpsd/icons.json @@ -0,0 +1,13 @@ +{ + "entity": { + "sensor": { + "mode": { + "default": "mdi:crosshairs", + "state": { + "2d_fix": "mdi:crosshairs-gps", + "3d_fix": "mdi:crosshairs-gps" + } + } + } + } +} diff --git a/homeassistant/components/gpsd/sensor.py b/homeassistant/components/gpsd/sensor.py index 932db081598..d5d25397f2a 100644 --- a/homeassistant/components/gpsd/sensor.py +++ b/homeassistant/components/gpsd/sensor.py @@ -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"