mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix docstrings (#15770)
This commit is contained in:
parent
95da41aa15
commit
a11c2a0bd8
@ -2,9 +2,10 @@
|
|||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
from homeassistant.loader import bind_hass
|
from homeassistant.loader import bind_hass
|
||||||
|
|
||||||
from .const import STEPS, STEP_USER, DOMAIN
|
from .const import DOMAIN, STEP_USER, STEPS
|
||||||
|
|
||||||
DEPENDENCIES = ['http']
|
DEPENDENCIES = ['http']
|
||||||
|
|
||||||
STORAGE_KEY = DOMAIN
|
STORAGE_KEY = DOMAIN
|
||||||
STORAGE_VERSION = 1
|
STORAGE_VERSION = 1
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ def async_is_onboarded(hass):
|
|||||||
|
|
||||||
|
|
||||||
async def async_setup(hass, config):
|
async def async_setup(hass, config):
|
||||||
"""Set up the onboard component."""
|
"""Set up the onboarding component."""
|
||||||
store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
|
store = hass.helpers.storage.Store(STORAGE_VERSION, STORAGE_KEY)
|
||||||
data = await store.async_load()
|
data = await store.async_load()
|
||||||
|
|
||||||
|
@ -3,21 +3,21 @@ import asyncio
|
|||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.core import callback
|
|
||||||
from homeassistant.components.http.view import HomeAssistantView
|
|
||||||
from homeassistant.components.http.data_validator import RequestDataValidator
|
from homeassistant.components.http.data_validator import RequestDataValidator
|
||||||
|
from homeassistant.components.http.view import HomeAssistantView
|
||||||
|
from homeassistant.core import callback
|
||||||
|
|
||||||
from .const import DOMAIN, STEPS, STEP_USER
|
from .const import DOMAIN, STEP_USER, STEPS
|
||||||
|
|
||||||
|
|
||||||
async def async_setup(hass, data, store):
|
async def async_setup(hass, data, store):
|
||||||
"""Setup onboarding."""
|
"""Set up the onboarding view."""
|
||||||
hass.http.register_view(OnboardingView(data, store))
|
hass.http.register_view(OnboardingView(data, store))
|
||||||
hass.http.register_view(UserOnboardingView(data, store))
|
hass.http.register_view(UserOnboardingView(data, store))
|
||||||
|
|
||||||
|
|
||||||
class OnboardingView(HomeAssistantView):
|
class OnboardingView(HomeAssistantView):
|
||||||
"""Returns the onboarding status."""
|
"""Return the onboarding status."""
|
||||||
|
|
||||||
requires_auth = False
|
requires_auth = False
|
||||||
url = '/api/onboarding'
|
url = '/api/onboarding'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user