Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions homeassistant/components/openuv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from homeassistant.helpers import aiohttp_client, config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.service import verify_domain_control

from .config_flow import configured_instances
from .const import DOMAIN
Expand Down Expand Up @@ -130,6 +131,8 @@ async def async_setup_entry(hass, config_entry):
from pyopenuv import Client
from pyopenuv.errors import OpenUvError

_verify_domain_control = verify_domain_control(hass, DOMAIN)

try:
websession = aiohttp_client.async_get_clientsession(hass)
openuv = OpenUV(
Expand All @@ -155,6 +158,7 @@ async def async_setup_entry(hass, config_entry):
hass.config_entries.async_forward_entry_setup(
config_entry, component))

@_verify_domain_control
async def update_data(service):
"""Refresh OpenUV data."""
_LOGGER.debug('Refreshing OpenUV data')
Expand Down