parent
4e2fcdb9a3
commit
2f9de2a5a5
homeassistant/components/ign_sismologia
tests/components/ign_sismologia
|
@ -201,6 +201,11 @@ class IgnSismologiaLocationEvent(GeolocationEvent):
|
|||
self._publication_date = feed_entry.published
|
||||
self._image_url = feed_entry.image_url
|
||||
|
||||
@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."""
|
||||
|
|
|
@ -23,6 +23,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
|
||||
|
@ -126,6 +127,7 @@ async def test_setup(hass):
|
|||
ATTR_MAGNITUDE: 5.7,
|
||||
ATTR_UNIT_OF_MEASUREMENT: "km",
|
||||
ATTR_SOURCE: "ign_sismologia",
|
||||
ATTR_ICON: "mdi:pulse",
|
||||
}
|
||||
assert float(state.state) == 15.5
|
||||
|
||||
|
@ -141,6 +143,7 @@ async def test_setup(hass):
|
|||
ATTR_MAGNITUDE: 4.6,
|
||||
ATTR_UNIT_OF_MEASUREMENT: "km",
|
||||
ATTR_SOURCE: "ign_sismologia",
|
||||
ATTR_ICON: "mdi:pulse",
|
||||
}
|
||||
assert float(state.state) == 20.5
|
||||
|
||||
|
@ -156,6 +159,7 @@ async def test_setup(hass):
|
|||
ATTR_REGION: "Region 3",
|
||||
ATTR_UNIT_OF_MEASUREMENT: "km",
|
||||
ATTR_SOURCE: "ign_sismologia",
|
||||
ATTR_ICON: "mdi:pulse",
|
||||
}
|
||||
assert float(state.state) == 25.5
|
||||
|
||||
|
|
Loading…
Reference in New Issue