mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Move imports to top for point (#29470)
This commit is contained in:
parent
96cf20ad81
commit
43665466f5
@ -2,6 +2,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from pypoint import PointSession
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
@ -71,7 +72,6 @@ async def async_setup(hass, config):
|
|||||||
|
|
||||||
async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
|
||||||
"""Set up Point from a config entry."""
|
"""Set up Point from a config entry."""
|
||||||
from pypoint import PointSession
|
|
||||||
|
|
||||||
def token_saver(token):
|
def token_saver(token):
|
||||||
_LOGGER.debug("Saving updated token")
|
_LOGGER.debug("Saving updated token")
|
||||||
|
@ -4,6 +4,7 @@ from collections import OrderedDict
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import async_timeout
|
import async_timeout
|
||||||
|
from pypoint import PointSession
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
@ -109,7 +110,6 @@ class PointFlowHandler(config_entries.ConfigFlow):
|
|||||||
|
|
||||||
async def _get_authorization_url(self):
|
async def _get_authorization_url(self):
|
||||||
"""Create Minut Point session and get authorization url."""
|
"""Create Minut Point session and get authorization url."""
|
||||||
from pypoint import PointSession
|
|
||||||
|
|
||||||
flow = self.hass.data[DATA_FLOW_IMPL][self.flow_impl]
|
flow = self.hass.data[DATA_FLOW_IMPL][self.flow_impl]
|
||||||
client_id = flow[CLIENT_ID]
|
client_id = flow[CLIENT_ID]
|
||||||
@ -138,7 +138,6 @@ class PointFlowHandler(config_entries.ConfigFlow):
|
|||||||
|
|
||||||
async def _async_create_session(self, code):
|
async def _async_create_session(self, code):
|
||||||
"""Create point session and entries."""
|
"""Create point session and entries."""
|
||||||
from pypoint import PointSession
|
|
||||||
|
|
||||||
flow = self.hass.data[DATA_FLOW_IMPL][DOMAIN]
|
flow = self.hass.data[DATA_FLOW_IMPL][DOMAIN]
|
||||||
client_id = flow[CLIENT_ID]
|
client_id = flow[CLIENT_ID]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user