mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Clean up tellduslive constants (#49765)
This commit is contained in:
parent
d2d80093a1
commit
b5cb9e4ade
@ -7,13 +7,12 @@ from tellduslive import DIM, TURNON, UP, Session
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import CONF_SCAN_INTERVAL
|
||||
from homeassistant.const import CONF_HOST, CONF_SCAN_INTERVAL
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
from homeassistant.helpers.event import async_call_later
|
||||
|
||||
from .const import (
|
||||
CONF_HOST,
|
||||
DOMAIN,
|
||||
KEY_SCAN_INTERVAL,
|
||||
KEY_SESSION,
|
||||
@ -52,7 +51,6 @@ INTERVAL_TRACKER = f"{DOMAIN}_INTERVAL"
|
||||
|
||||
async def async_setup_entry(hass, entry):
|
||||
"""Create a tellduslive session."""
|
||||
|
||||
conf = entry.data[KEY_SESSION]
|
||||
|
||||
if CONF_HOST in conf:
|
||||
|
@ -1,13 +1,6 @@
|
||||
"""Consts used by TelldusLive."""
|
||||
from datetime import timedelta
|
||||
|
||||
from homeassistant.const import ( # noqa: F401 pylint: disable=unused-import
|
||||
ATTR_BATTERY_LEVEL,
|
||||
CONF_HOST,
|
||||
CONF_TOKEN,
|
||||
DEVICE_DEFAULT_NAME,
|
||||
)
|
||||
|
||||
APPLICATION_NAME = "Home Assistant"
|
||||
|
||||
DOMAIN = "tellduslive"
|
||||
|
@ -93,7 +93,6 @@ class TelldusLiveEntity(Entity):
|
||||
@property
|
||||
def _battery_level(self):
|
||||
"""Return the battery level of a device."""
|
||||
|
||||
if self.device.battery == BATTERY_LOW:
|
||||
return 1
|
||||
if self.device.battery == BATTERY_UNKNOWN:
|
||||
|
Loading…
x
Reference in New Issue
Block a user