mirror of
https://github.com/home-assistant/core
synced 2024-09-03 08:14:07 +02:00
Add service to reboot the Freebox (#29525)
This commit is contained in:
parent
9d7799c0af
commit
ee657f3c2f
@ -71,6 +71,12 @@ async def async_setup_freebox(hass, config, host, port):
|
||||
else:
|
||||
hass.data[DATA_FREEBOX] = fbx
|
||||
|
||||
async def async_freebox_reboot(call):
|
||||
"""Handle reboot service call."""
|
||||
await fbx.system.reboot()
|
||||
|
||||
hass.services.async_register(DOMAIN, "reboot", async_freebox_reboot)
|
||||
|
||||
hass.async_create_task(async_load_platform(hass, "sensor", DOMAIN, {}, config))
|
||||
hass.async_create_task(
|
||||
async_load_platform(hass, "device_tracker", DOMAIN, {}, config)
|
||||
|
5
homeassistant/components/freebox/services.yaml
Normal file
5
homeassistant/components/freebox/services.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
# Freebox service entries description.
|
||||
|
||||
reboot:
|
||||
# Description of the service
|
||||
description: Reboots the Freebox.
|
Loading…
Reference in New Issue
Block a user