Rename CONF_ATTRIBUTION to ATTRIBUTION (#21069)
* Rename CONF_ATTRIBUTION to ATTRIBUTION * Update homeassistant/components/sensor/irish_rail_transport.py Co-Authored-By: fabaff <mail@fabian-affolter.ch>
This commit is contained in:
parent
03ec3ac16e
commit
cdc4dc3f11
66 changed files with 232 additions and 239 deletions
|
@ -19,9 +19,10 @@ REQUIREMENTS = ['python-sochain-api==0.0.2']
|
|||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTRIBUTION = "Data provided by chain.so"
|
||||
|
||||
CONF_ADDRESS = 'address'
|
||||
CONF_NETWORK = 'network'
|
||||
CONF_ATTRIBUTION = "Data provided by chain.so"
|
||||
|
||||
DEFAULT_NAME = 'Crypto Balance'
|
||||
|
||||
|
@ -34,8 +35,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||
})
|
||||
|
||||
|
||||
async def async_setup_platform(hass, config, async_add_entities,
|
||||
discovery_info=None):
|
||||
async def async_setup_platform(
|
||||
hass, config, async_add_entities, discovery_info=None):
|
||||
"""Set up the sochain sensors."""
|
||||
from pysochain import ChainSo
|
||||
address = config.get(CONF_ADDRESS)
|
||||
|
@ -77,7 +78,7 @@ class SochainSensor(Entity):
|
|||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the sensor."""
|
||||
return {
|
||||
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
|
||||
ATTR_ATTRIBUTION: ATTRIBUTION,
|
||||
}
|
||||
|
||||
async def async_update(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue