diff --git a/CODEOWNERS b/CODEOWNERS index 7c2e69c9af19..27c4f03ae937 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -289,6 +289,7 @@ homeassistant/components/upcloud/* @scop homeassistant/components/updater/* @home-assistant/core homeassistant/components/upnp/* @robbiet480 homeassistant/components/uptimerobot/* @ludeeus +homeassistant/components/usgs_earthquakes_feed/* @exxamalte homeassistant/components/utility_meter/* @dgomes homeassistant/components/velbus/* @cereal2nd homeassistant/components/velux/* @Julius2342 diff --git a/homeassistant/components/usgs_earthquakes_feed/geo_location.py b/homeassistant/components/usgs_earthquakes_feed/geo_location.py index 7e5d6f5ebfef..7890243c1e0a 100644 --- a/homeassistant/components/usgs_earthquakes_feed/geo_location.py +++ b/homeassistant/components/usgs_earthquakes_feed/geo_location.py @@ -243,6 +243,11 @@ class UsgsEarthquakesEvent(GeolocationEvent): self._type = feed_entry.type self._alert = feed_entry.alert + @property + def icon(self): + """Return the icon to use in the frontend.""" + return "mdi:pulse" + @property def source(self) -> str: """Return source value of this external event.""" diff --git a/homeassistant/components/usgs_earthquakes_feed/manifest.json b/homeassistant/components/usgs_earthquakes_feed/manifest.json index 00aa23c3d4d0..0d1c116786ab 100644 --- a/homeassistant/components/usgs_earthquakes_feed/manifest.json +++ b/homeassistant/components/usgs_earthquakes_feed/manifest.json @@ -6,5 +6,7 @@ "geojson_client==0.4" ], "dependencies": [], - "codeowners": [] + "codeowners": [ + "@exxamalte" + ] } diff --git a/tests/components/usgs_earthquakes_feed/test_geo_location.py b/tests/components/usgs_earthquakes_feed/test_geo_location.py index 69037e3b5f57..65ceec4d425e 100644 --- a/tests/components/usgs_earthquakes_feed/test_geo_location.py +++ b/tests/components/usgs_earthquakes_feed/test_geo_location.py @@ -26,6 +26,7 @@ from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_LATITUDE, CONF_LONGITUDE, + ATTR_ICON, ) from homeassistant.setup import async_setup_component from tests.common import assert_setup_component, async_fire_time_changed @@ -148,6 +149,7 @@ async def test_setup(hass): ATTR_MAGNITUDE: 5.7, ATTR_UNIT_OF_MEASUREMENT: "km", ATTR_SOURCE: "usgs_earthquakes_feed", + ATTR_ICON: "mdi:pulse", } assert round(abs(float(state.state) - 15.5), 7) == 0 @@ -161,6 +163,7 @@ async def test_setup(hass): ATTR_FRIENDLY_NAME: "Title 2", ATTR_UNIT_OF_MEASUREMENT: "km", ATTR_SOURCE: "usgs_earthquakes_feed", + ATTR_ICON: "mdi:pulse", } assert round(abs(float(state.state) - 20.5), 7) == 0 @@ -174,6 +177,7 @@ async def test_setup(hass): ATTR_FRIENDLY_NAME: "Title 3", ATTR_UNIT_OF_MEASUREMENT: "km", ATTR_SOURCE: "usgs_earthquakes_feed", + ATTR_ICON: "mdi:pulse", } assert round(abs(float(state.state) - 25.5), 7) == 0