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:
1 parent
03ec3ac16e
commit
cdc4dc3f11
66 files changed
+232
-239
No files matched your search
@@ -15,10 +15,11 @@ from homeassistant.helpers.entity import Entity
|
||||
|
||||
REQUIREMENTS = ['python-etherscan-api==0.0.3']
|
||||
|
||||
ATTRIBUTION = "Data provided by etherscan.io"
|
||||
|
||||
CONF_ADDRESS = 'address'
|
||||
CONF_TOKEN = 'token'
|
||||
CONF_TOKEN_ADDRESS = 'token_address'
|
||||
CONF_ATTRIBUTION = "Data provided by etherscan.io"
|
||||
|
||||
SCAN_INTERVAL = timedelta(minutes=5)
|
||||
|
||||
@@ -77,9 +78,7 @@ class EtherscanSensor(Entity):
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Return the state attributes of the sensor."""
|
||||
return {
|
||||
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
|
||||
}
|
||||
return {ATTR_ATTRIBUTION: ATTRIBUTION}
|
||||
|
||||
def update(self):
|
||||
"""Get the latest state of the sensor."""
|
||||
|
||||
Reference in new issue
Block a user