Clean up tellduslive constants (#49765)

This commit is contained in:
tkdrob 2021-04-27 12:36:41 -04:00 committed by GitHub
parent d2d80093a1
commit b5cb9e4ade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 11 deletions

View File

@ -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:

View File

@ -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"

View File

@ -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: