mirror of
https://github.com/home-assistant/core
synced 2024-09-09 12:51:22 +02: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
|
||||
from typing import Any, Dict
|
||||
|
||||
from google.cloud import pubsub_v1
|
||||
import voluptuous as vol
|
||||
|
||||
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]):
|
||||
"""Activate Google Pub/Sub component."""
|
||||
from google.cloud import pubsub_v1
|
||||
|
||||
config = yaml_config[DOMAIN]
|
||||
project_id = config[CONF_PROJECT_ID]
|
||||
|
Loading…
Reference in New Issue
Block a user