mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Move imports to top for google_pubsub (#29498)
This commit is contained in:
parent
564fed7879
commit
086d1f432d
@ -5,6 +5,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
|
from google.cloud import pubsub_v1
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import EVENT_STATE_CHANGED, STATE_UNAVAILABLE, STATE_UNKNOWN
|
from homeassistant.const import EVENT_STATE_CHANGED, STATE_UNAVAILABLE, STATE_UNKNOWN
|
||||||
@ -38,7 +39,6 @@ CONFIG_SCHEMA = vol.Schema(
|
|||||||
|
|
||||||
def setup(hass: HomeAssistant, yaml_config: Dict[str, Any]):
|
def setup(hass: HomeAssistant, yaml_config: Dict[str, Any]):
|
||||||
"""Activate Google Pub/Sub component."""
|
"""Activate Google Pub/Sub component."""
|
||||||
from google.cloud import pubsub_v1
|
|
||||||
|
|
||||||
config = yaml_config[DOMAIN]
|
config = yaml_config[DOMAIN]
|
||||||
project_id = config[CONF_PROJECT_ID]
|
project_id = config[CONF_PROJECT_ID]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user