Move imports in uscis component (#27481)

pull/27559/head
Quentame 2019-10-12 21:54:16 +02:00 committed by Paulus Schoutsen
parent 5198f522c7
commit 54d63c63c3
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,8 @@
"""Support for USCIS Case Status.""" """Support for USCIS Case Status."""
import logging import logging
from datetime import timedelta from datetime import timedelta
import uscisstatus
import voluptuous as vol import voluptuous as vol
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
@ -67,8 +68,6 @@ class UscisSensor(Entity):
@Throttle(MIN_TIME_BETWEEN_UPDATES) @Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self): def update(self):
"""Fetch data from the USCIS website and update state attributes.""" """Fetch data from the USCIS website and update state attributes."""
import uscisstatus
try: try:
status = uscisstatus.get_case_status(self._case_id) status = uscisstatus.get_case_status(self._case_id)
self._attributes = {self.CURRENT_STATUS: status["status"]} self._attributes = {self.CURRENT_STATUS: status["status"]}