Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions homeassistant/components/qld_bushfire/geo_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ def _update_from_feed(self, feed_entry):
self._updated_date = feed_entry.updated
self._status = feed_entry.status

@property
def icon(self):
"""Return the icon to use in the frontend."""
return "mdi:fire"

@property
def source(self) -> str:
"""Return source value of this external event."""
Expand Down
18 changes: 11 additions & 7 deletions tests/components/qld_bushfire/test_geo_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@
from homeassistant.components import geo_location
from homeassistant.components.geo_location import ATTR_SOURCE
from homeassistant.components.qld_bushfire.geo_location import (
ATTR_EXTERNAL_ID,
SCAN_INTERVAL,
ATTR_CATEGORY,
ATTR_STATUS,
ATTR_EXTERNAL_ID,
ATTR_PUBLICATION_DATE,
ATTR_STATUS,
ATTR_UPDATED_DATE,
SCAN_INTERVAL,
)
from homeassistant.const import (
EVENT_HOMEASSISTANT_START,
CONF_RADIUS,
ATTR_ATTRIBUTION,
ATTR_FRIENDLY_NAME,
ATTR_ICON,
ATTR_LATITUDE,
ATTR_LONGITUDE,
ATTR_FRIENDLY_NAME,
ATTR_UNIT_OF_MEASUREMENT,
ATTR_ATTRIBUTION,
CONF_LATITUDE,
CONF_LONGITUDE,
CONF_RADIUS,
EVENT_HOMEASSISTANT_START,
)
from homeassistant.setup import async_setup_component
from tests.common import assert_setup_component, async_fire_time_changed
Expand Down Expand Up @@ -122,6 +123,7 @@ async def test_setup(hass):
ATTR_STATUS: "Status 1",
ATTR_UNIT_OF_MEASUREMENT: "km",
ATTR_SOURCE: "qld_bushfire",
ATTR_ICON: "mdi:fire",
}
assert float(state.state) == 15.5

Expand All @@ -135,6 +137,7 @@ async def test_setup(hass):
ATTR_FRIENDLY_NAME: "Title 2",
ATTR_UNIT_OF_MEASUREMENT: "km",
ATTR_SOURCE: "qld_bushfire",
ATTR_ICON: "mdi:fire",
}
assert float(state.state) == 20.5

Expand All @@ -148,6 +151,7 @@ async def test_setup(hass):
ATTR_FRIENDLY_NAME: "Title 3",
ATTR_UNIT_OF_MEASUREMENT: "km",
ATTR_SOURCE: "qld_bushfire",
ATTR_ICON: "mdi:fire",
}
assert float(state.state) == 25.5

Expand Down