mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +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."""
|
"""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"]}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user