Use constants from const.py (#21068)
* Use constants from const.py * Fix lint issues
This commit is contained in:
1 parent
9d3eaada27
commit
2d2c6cf4a1
21 files changed
+105
-188
No files matched your search
@@ -1,15 +1,11 @@
|
||||
"""
|
||||
Support for Etherscan sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.etherscan/
|
||||
"""
|
||||
"""Support for Etherscan sensors."""
|
||||
from datetime import timedelta
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION, CONF_ADDRESS, CONF_NAME, CONF_TOKEN)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
@@ -17,8 +13,6 @@ REQUIREMENTS = ['python-etherscan-api==0.0.3']
|
||||
|
||||
ATTRIBUTION = "Data provided by etherscan.io"
|
||||
|
||||
CONF_ADDRESS = 'address'
|
||||
CONF_TOKEN = 'token'
|
||||
CONF_TOKEN_ADDRESS = 'token_address'
|
||||
|
||||
SCAN_INTERVAL = timedelta(minutes=5)
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
"""
|
||||
Support for Ripple sensors.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.ripple/
|
||||
"""
|
||||
"""Support for Ripple sensors."""
|
||||
from datetime import timedelta
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (CONF_NAME, ATTR_ATTRIBUTION)
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_ADDRESS, CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['python-ripple-api==0.0.3']
|
||||
|
||||
CONF_ADDRESS = 'address'
|
||||
ATTRIBUTION = "Data provided by ripple.com"
|
||||
|
||||
DEFAULT_NAME = 'Ripple Balance'
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
"""
|
||||
Support for watching multiple cryptocurrencies.
|
||||
|
||||
For more details about this platform, please refer to the documentation at
|
||||
https://home-assistant.io/components/sensor.sochain/
|
||||
"""
|
||||
import logging
|
||||
"""Support for watching multiple cryptocurrencies."""
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (CONF_NAME, ATTR_ATTRIBUTION)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_ADDRESS, CONF_NAME
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['python-sochain-api==0.0.2']
|
||||
|
||||
@@ -21,7 +16,6 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTRIBUTION = "Data provided by chain.so"
|
||||
|
||||
CONF_ADDRESS = 'address'
|
||||
CONF_NETWORK = 'network'
|
||||
|
||||
DEFAULT_NAME = 'Crypto Balance'
|
||||
|
||||
Reference in new issue
Block a user