Skip to content

Commit

Permalink
Make 'execute_command' service an admin service (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
iMicknl authored Jan 18, 2021
1 parent fad75f2 commit c170fb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/tahoma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from homeassistant.const import CONF_EXCLUDE, CONF_PASSWORD, CONF_SOURCE, CONF_USERNAME
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import config_validation as cv, service
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from pyhoma.client import TahomaClient
from pyhoma.exceptions import (
Expand Down Expand Up @@ -183,7 +183,8 @@ async def handle_execute_command(call):
"Home Assistant Service",
)

hass.services.async_register(
service.async_register_admin_service(
hass,
DOMAIN,
SERVICE_EXECUTE_COMMAND,
handle_execute_command,
Expand Down

0 comments on commit c170fb0

Please sign in to comment.