Commit graph

19 commits

Author SHA1 Message Date
Sergey Krashevich
502bebb766
fix(mikrotik_router): ensure proper spacing in combined changelogs 2024-04-19 20:45:21 +03:00
Sergey Krashevich
b9d87cd6aa
feat(mikrotik_router): fetch and concatenate changelogs for updates in reverse order 2024-04-16 18:31:35 +03:00
Sergey Krashevich
b6c89fb152
refactor(mikrotik_router): remove unused aiohttp import from update module 2024-04-16 18:03:00 +03:00
Sergey Krashevich
2aa2191334
refactor(mikrotik_router): use existing session for fetching release notes
Optimized the process of fetching release notes in the Mikrotik Router integration by utilizing the existing HTTP client session from Home Assistant's aiohttp_client. This change avoids creating a new session for each request, leading to more efficient resource usage and potentially reducing the likelihood of encountering issues related to session management.

By leveraging `async_get_clientsession`, the update component now aligns better with Home Assistant's recommended practices for external HTTP requests, ensuring consistency and reliability in how network calls are made within integrations.
2024-04-16 17:58:26 +03:00
Sergey Krashevich
ccc097c438
feat(mikrotik_router): switch to aiohttp for async release notes fetching
This commit replaces the synchronous requests library with aiohttp for asynchronous fetching of Mikrotik RouterOS update release notes. It introduces the use of Home Assistant's built-in `async_create_clientsession` to manage HTTP sessions, enhancing the integration's performance and reliability by leveraging asyncio for network operations.

The change aims to improve the responsiveness and efficiency of the Mikrotik Router integration within Home Assistant, particularly in retrieving release notes for updates. By moving to an asynchronous model, the integration can now fetch data without blocking the execution of other tasks, leading to a smoother user experience.

Additionally, the error handling has been updated to provide clearer messages in the log when the release notes cannot be fetched, either due to a network error or an exception. This improvement aids in troubleshooting and ensures that users are better informed about the status of their update checks.
2024-04-16 17:57:02 +03:00
Sergey Krashevich
8e8ff310c1
feat(mikrotik_router): format release notes for better readability
This commit updates the handling of MikroTik RouterOS update release notes within the custom component. Specifically, it modifies the formatting of the release notes text by replacing instances of "*) " with "- ", in addition to converting newline characters to "<br />" HTML tags. This change aims to improve the readability of the release notes when displayed in the UI, making it easier for users to understand the changes in each RouterOS update.
2024-04-16 17:57:01 +03:00
Sergey Krashevich
04b0987781
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.
2024-04-16 17:55:55 +03:00
Tomaae
9c5a270b4f
cleanup 2023-08-10 02:03:11 +02:00
Tomaae
514a930d04
fixed firmware update sensor 2023-08-09 10:18:46 +02:00
Tomaae
15bc156d74
converted update sensors 2023-08-09 09:53:48 +02:00
Tomaae
a21e95c36a
coordinator update 2023-08-08 00:50:09 +02:00
Sergio Mayoral Martinez
b2d36ebafc title implemented via entity descriptor 2022-08-17 16:23:41 +02:00
Sergio Mayoral Martinez
34b373f3ee Black Formatting 2022-08-17 13:09:59 +02:00
Sergio Mayoral Martinez
e32ffd19a1 Move the firmware entity update to the right place 2022-08-17 12:54:26 +02:00
Sergio Mayoral Martinez
a588cec520 add title to update entities 2022-08-17 12:36:59 +02:00
Tomaae
cbac88efd2
removed forgotten debug line 2022-08-16 14:37:37 +02:00
Tomaae
f4bffc55de
add update sensor for routerboard firmware #229 2022-08-11 14:58:30 +02:00
Tomaae
6a089556db
Improved error message when release notes fetch fails #229 2022-08-11 14:57:29 +02:00
Tomaae
c639d65332
Replaced fwupdate with new HA update entity #229 2022-08-11 12:56:28 +02:00