pull/1161/head
Fabian Affolter 2016-02-05 13:13:37 +01:00
parent 0bb63bf3f0
commit 02efe903ab
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,7 @@ OPTION_TYPES = {
'miners_revenue_btc': ['Miners revenue', 'BTC'],
'market_price_usd': ['Market price', 'USD']
}
ICON = 'mdi:currency-btc'
# Return cached results if last scan was less then this time ago
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=120)
@ -108,6 +109,11 @@ class BitcoinSensor(Entity):
def unit_of_measurement(self):
return self._unit_of_measurement
@property
def icon(self):
""" Icon to use in the frontend, if any. """
return ICON
# pylint: disable=too-many-branches
def update(self):
""" Gets the latest data and updates the states. """