1
mirror of https://github.com/home-assistant/core synced 2024-09-28 03:04:04 +02:00

round $ to 2 decimals (#4786)

This commit is contained in:
Nolan Gilley 2016-12-07 03:15:48 -05:00 committed by Fabian Affolter
parent 98fe50d5ad
commit 82ad8b0a8f

View File

@ -77,7 +77,7 @@ class CoinMarketCapSensor(Entity):
@property
def state(self):
"""Return the state of the sensor."""
return self._ticker.get('price_usd')
return round(self._ticker.get('price_usd'), 2)
@property
def unit_of_measurement(self):