mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add icon translations to Waze Travel Time (#112352)
* Add icon translations to Waze Travel Time * Fix tests
This commit is contained in:
parent
581a4f82b2
commit
74dabff4a7
9
homeassistant/components/waze_travel_time/icons.json
Normal file
9
homeassistant/components/waze_travel_time/icons.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"waze_travel_time": {
|
||||
"default": "mdi:car"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -90,6 +90,7 @@ class WazeTravelTime(SensorEntity):
|
||||
identifiers={(DOMAIN, DOMAIN)},
|
||||
configuration_url="https://www.waze.com",
|
||||
)
|
||||
_attr_translation_key = "waze_travel_time"
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -105,7 +106,6 @@ class WazeTravelTime(SensorEntity):
|
||||
self._attr_name = name
|
||||
self._origin = origin
|
||||
self._destination = destination
|
||||
self._attr_icon = "mdi:car"
|
||||
self._state = None
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
|
@ -74,7 +74,6 @@ async def test_sensor(hass: HomeAssistant) -> None:
|
||||
hass.states.get("sensor.waze_travel_time").attributes["unit_of_measurement"]
|
||||
== "min"
|
||||
)
|
||||
assert hass.states.get("sensor.waze_travel_time").attributes["icon"] == "mdi:car"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
|
Loading…
x
Reference in New Issue
Block a user