mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Set brand icon on WLED update entity (#69145)
This commit is contained in:
parent
1103c5d101
commit
1a04dc4fca
@ -50,6 +50,11 @@ class WLEDUpdateEntity(WLEDEntity, UpdateEntity):
|
||||
return None
|
||||
return str(version)
|
||||
|
||||
@property
|
||||
def entity_picture(self) -> str:
|
||||
"""Return the entity picture to use in the frontend, if any."""
|
||||
return "https://brands.home-assistant.io/wled/icon.png"
|
||||
|
||||
@property
|
||||
def latest_version(self) -> str | None:
|
||||
"""Latest version available for install."""
|
||||
|
@ -20,6 +20,7 @@ from homeassistant.components.update.const import (
|
||||
from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ENTITY_ID,
|
||||
ATTR_ENTITY_PICTURE,
|
||||
ATTR_ICON,
|
||||
ATTR_SUPPORTED_FEATURES,
|
||||
STATE_OFF,
|
||||
@ -46,6 +47,10 @@ async def test_update_available(
|
||||
assert state
|
||||
assert state.attributes.get(ATTR_DEVICE_CLASS) == UpdateDeviceClass.FIRMWARE
|
||||
assert state.state == STATE_ON
|
||||
assert (
|
||||
state.attributes[ATTR_ENTITY_PICTURE]
|
||||
== "https://brands.home-assistant.io/wled/icon.png"
|
||||
)
|
||||
assert state.attributes[ATTR_INSTALLED_VERSION] == "0.8.5"
|
||||
assert state.attributes[ATTR_LATEST_VERSION] == "0.12.0"
|
||||
assert state.attributes[ATTR_RELEASE_SUMMARY] is None
|
||||
|
Loading…
x
Reference in New Issue
Block a user