Skip to content

Commit

Permalink
Add release notes URL to update entity
Browse files Browse the repository at this point in the history
  • Loading branch information
PimDoos committed May 3, 2024
1 parent a106379 commit 8fc2d06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions custom_components/sessy/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
SESSY_CACHE_INTERVAL = "sessy_cache_interval"

ENTITY_ERROR_THRESHOLD = 5

SESSY_RELEASE_NOTES_URL = "https://www.sessy.nl/firmware-updates"
3 changes: 2 additions & 1 deletion custom_components/sessy/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from sessypy.const import SessyApiCommand, SessyOtaTarget, SessyOtaState
from sessypy.devices import SessyBattery, SessyDevice, SessyP1Meter, SessyCTMeter

from .const import DEFAULT_SCAN_INTERVAL, DOMAIN, SESSY_DEVICE, SCAN_INTERVAL_OTA_BUSY
from .const import DEFAULT_SCAN_INTERVAL, DOMAIN, SESSY_DEVICE, SCAN_INTERVAL_OTA_BUSY, SESSY_RELEASE_NOTES_URL
from .util import assert_cache_interval, get_cache_command, trigger_cache_update, unit_interval_to_percentage
from .sessyentity import SessyEntity

Expand Down Expand Up @@ -63,6 +63,7 @@ def __init__(self, hass: HomeAssistant, config_entry: ConfigEntry, name: str,
self._attr_entity_registry_enabled_default = enabled_default
self._attr_device_class = UpdateDeviceClass.FIRMWARE
self._attr_supported_features = UpdateEntityFeature.INSTALL | UpdateEntityFeature.PROGRESS
self._attr_release_url = SESSY_RELEASE_NOTES_URL

self.cache_target = cache_target
if action_target:
Expand Down

0 comments on commit 8fc2d06

Please sign in to comment.