mirror of
https://github.com/home-assistant/core.git
synced 2025-08-13 17:45:19 +02:00
Move imports to top for uptimerobot (#29103)
* Move imports to top for uptimerobot * Move imports to top for twilio_call * Revert twilio_call
This commit is contained in:
committed by
Paulus Schoutsen
parent
499838d5a7
commit
33af72a54f
@@ -1,6 +1,7 @@
|
|||||||
"""A platform that to monitor Uptime Robot monitors."""
|
"""A platform that to monitor Uptime Robot monitors."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from pyuptimerobot import UptimeRobot
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
||||||
@@ -18,7 +19,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({vol.Required(CONF_API_KEY): cv.string}
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the Uptime Robot binary_sensors."""
|
"""Set up the Uptime Robot binary_sensors."""
|
||||||
from pyuptimerobot import UptimeRobot
|
|
||||||
|
|
||||||
up_robot = UptimeRobot()
|
up_robot = UptimeRobot()
|
||||||
api_key = config.get(CONF_API_KEY)
|
api_key = config.get(CONF_API_KEY)
|
||||||
|
Reference in New Issue
Block a user