1
mirror of https://github.com/home-assistant/core synced 2024-08-31 05:57:13 +02:00

Add reboot_gateway service to Velux (#43198)

This commit is contained in:
Paul Daumlechner 2021-01-29 20:07:58 +01:00 committed by GitHub
parent 0fe3d6ea81
commit 48e899ca3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -58,11 +58,18 @@ class VeluxModule:
_LOGGER.debug("Velux interface terminated")
await self.pyvlx.disconnect()
async def async_reboot_gateway(service_call):
await self.pyvlx.reboot_gateway()
self._hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, on_hass_stop)
host = self._domain_config.get(CONF_HOST)
password = self._domain_config.get(CONF_PASSWORD)
self.pyvlx = PyVLX(host=host, password=password)
self._hass.services.async_register(
DOMAIN, "reboot_gateway", async_reboot_gateway
)
async def async_start(self):
"""Start velux component."""
_LOGGER.debug("Velux interface started")

View File

@ -0,0 +1,4 @@
# Velux Integration services
reboot_gateway:
description: Reboots the KLF200 Gateway.