mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-10 09:24:31 +02:00
feat(update): update Mikrotik RouterOS changelog URL
This commit updates the URL used to fetch the Mikrotik RouterOS changelog. Previously, the integration fetched the changelog from a general Mikrotik changelogs page, which required specifying the version as a parameter. This approach has been changed to directly access the changelog from the CDN for the specific RouterOS version in question. The change ensures that the integration directly accesses the relevant changelog file for the specified RouterOS version, potentially improving reliability and speed of access to these changelogs. This modification is particularly useful for environments where RouterOS updates are closely monitored, and up-to-date information is critical for maintaining system security and performance.
This commit is contained in:
parent
802c218bc9
commit
04b0987781
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
"""Support for the Mikrotik Router update service."""
|
"""Support for the Mikrotik Router update service."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
@ -92,7 +93,7 @@ class MikrotikRouterOSUpdate(MikrotikEntity, UpdateEntity):
|
||||||
try:
|
try:
|
||||||
response = await self.coordinator.hass.async_add_executor_job(
|
response = await self.coordinator.hass.async_add_executor_job(
|
||||||
requests_get,
|
requests_get,
|
||||||
f"https://mikrotik.com/download/changelogs?ax=loadLog&val={self._data['latest-version']}",
|
f"https://cdn.mikrotik.com/routeros/{self._data['latest-version']}/CHANGELOG",
|
||||||
)
|
)
|
||||||
|
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue