Move imports to top for google_pubsub (#29498)

This commit is contained in:
springstan
2019-12-05 12:59:59 +01:00
committed by Franck Nijhof
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]