Skip to content

Commit

Permalink
Use UpdateEntityFeature in update platform (#3418)
Browse files Browse the repository at this point in the history
fixes #3417
  • Loading branch information
bdraco authored Dec 28, 2023
1 parent 98a1f52 commit f7fa3c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions custom_components/hacs/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from typing import Any

from homeassistant.components.update import UpdateEntity
from homeassistant.components.update import UpdateEntity, UpdateEntityFeature
from homeassistant.core import HomeAssistantError, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect

Expand All @@ -27,7 +27,12 @@ async def async_setup_entry(hass, _config_entry, async_add_devices):
class HacsRepositoryUpdateEntity(HacsRepositoryEntity, UpdateEntity):
"""Update entities for repositories downloaded with HACS."""

_attr_supported_features = 1 | 2 | 4 | 16
_attr_supported_features = (
UpdateEntityFeature.INSTALL
| UpdateEntityFeature.SPECIFIC_VERSION
| UpdateEntityFeature.PROGRESS
| UpdateEntityFeature.RELEASE_NOTES
)

@property
def name(self) -> str | None:
Expand Down

0 comments on commit f7fa3c2

Please sign in to comment.