Avoid TypeError for state (#4897)

This commit is contained in:
Fabian Affolter authored and Paulus Schoutsen committed 2016-12-15 22:14:59 -08:00
1 parent 02517ae5ec
commit 7748867732
1 file changed
+1 -1
@@ -77,7 +77,7 @@ class CoinMarketCapSensor(Entity):
@property
def state(self):
"""Return the state of the sensor."""
return round(self._ticker.get('price_usd'), 2)
return round(float(self._ticker.get('price_usd')), 2)
@property
def unit_of_measurement(self):