Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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: 1 addition & 4 deletions homeassistant/components/mqtt/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ class MqttUpdate(MqttEntity, UpdateEntity, RestoreEntity):
@property
def entity_picture(self) -> str | None:
"""Return the entity picture to use in the frontend."""
if self._attr_entity_picture is not None:
return self._attr_entity_picture

return super().entity_picture
return self._attr_entity_picture

@staticmethod
def config_schema() -> VolSchemaType:
Expand Down
13 changes: 3 additions & 10 deletions tests/components/mqtt/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,7 @@ async def test_value_template(
assert state.state == STATE_OFF
assert state.attributes.get("installed_version") == "1.9.0"
assert state.attributes.get("latest_version") == "1.9.0"
assert (
state.attributes.get("entity_picture")
== "https://brands.home-assistant.io/_/mqtt/icon.png"
)
assert state.attributes.get("entity_picture") is None

async_fire_mqtt_message(hass, latest_version_topic, '{"latest":"2.0.0"}')

Expand Down Expand Up @@ -324,10 +321,7 @@ async def test_value_template_float(
assert state.state == STATE_OFF
assert state.attributes.get("installed_version") == "1.9"
assert state.attributes.get("latest_version") == "1.9"
assert (
state.attributes.get("entity_picture")
== "https://brands.home-assistant.io/_/mqtt/icon.png"
)
assert state.attributes.get("entity_picture") is None

async_fire_mqtt_message(hass, latest_version_topic, '{"latest":"2.0"}')

Expand Down Expand Up @@ -952,6 +946,5 @@ async def test_entity_icon_and_entity_picture(
hass,
mqtt_mock_entry,
domain,
config,
default_entity_picture="https://brands.home-assistant.io/_/mqtt/icon.png",
config
)