mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00: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…
x
Reference in New Issue
Block a user