Deprecate velux reboot action (#155549)

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
wollew
2025-11-11 20:23:07 +01:00
committed by GitHub
parent 7851bed00c
commit 9760eb7f2b
2 changed files with 19 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ from pyvlx import PyVLX, PyVLXException
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_HOST, CONF_PASSWORD, EVENT_HOMEASSISTANT_STOP
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers import device_registry as dr, issue_registry as ir
from .const import DOMAIN, LOGGER, PLATFORMS
@@ -51,6 +51,18 @@ async def async_setup_entry(hass: HomeAssistant, entry: VeluxConfigEntry) -> boo
await pyvlx.disconnect()
async def async_reboot_gateway(service_call: ServiceCall) -> None:
"""Reboot the gateway (deprecated - use button entity instead)."""
ir.async_create_issue(
hass,
DOMAIN,
"deprecated_reboot_service",
is_fixable=False,
issue_domain=DOMAIN,
severity=ir.IssueSeverity.WARNING,
translation_key="deprecated_reboot_service",
breaks_in_ha_version="2026.6.0",
)
await pyvlx.reboot_gateway()
entry.async_on_unload(

View File

@@ -41,6 +41,12 @@
"message": "Failed to reboot gateway. Try again in a few moments or power cycle the device manually"
}
},
"issues": {
"deprecated_reboot_service": {
"description": "The `velux.reboot_gateway` service is deprecated and will be removed in Home Assistant 2026.6.0. Please use the 'Restart' button entity instead. You can find this button in the device page for your KLF 200 Gateway or by searching for 'restart' in your entity list.",
"title": "Velux reboot service is deprecated"
}
},
"services": {
"reboot_gateway": {
"description": "Reboots the KLF200 Gateway",