mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Move imports in uscis component (#27481)
This commit is contained in:
parent
5198f522c7
commit
54d63c63c3
@ -1,7 +1,8 @@
|
||||
"""Support for USCIS Case Status."""
|
||||
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
import uscisstatus
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@ -67,8 +68,6 @@ class UscisSensor(Entity):
|
||||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
||||
def update(self):
|
||||
"""Fetch data from the USCIS website and update state attributes."""
|
||||
import uscisstatus
|
||||
|
||||
try:
|
||||
status = uscisstatus.get_case_status(self._case_id)
|
||||
self._attributes = {self.CURRENT_STATUS: status["status"]}
|
||||
|
Loading…
x
Reference in New Issue
Block a user