Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move fibaro imports at top-level #28995

Merged
merged 1 commit into from Nov 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions homeassistant/components/fibaro/__init__.py
@@ -1,7 +1,9 @@
"""Support for the Fibaro devices."""
import logging
from collections import defaultdict
import logging
from typing import Optional

from fiblary3.client.v4.client import Client as FibaroClient, StateHandler
import voluptuous as vol

from homeassistant.const import (
Expand Down Expand Up @@ -109,7 +111,6 @@ class FibaroController:

def __init__(self, config):
"""Initialize the Fibaro controller."""
from fiblary3.client.v4.client import Client as FibaroClient

self._client = FibaroClient(
config[CONF_URL], config[CONF_USERNAME], config[CONF_PASSWORD]
Expand Down Expand Up @@ -148,8 +149,6 @@ def connect(self):

def enable_state_handler(self):
"""Start StateHandler thread for monitoring updates."""
from fiblary3.client.v4.client import StateHandler

self._state_handler = StateHandler(self._client, self._on_state_change)

def disable_state_handler(self):
Expand Down