mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
round $ to 2 decimals (#4786)
This commit is contained in:
parent
98fe50d5ad
commit
82ad8b0a8f
@ -77,7 +77,7 @@ class CoinMarketCapSensor(Entity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
return self._ticker.get('price_usd')
|
return round(self._ticker.get('price_usd'), 2)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unit_of_measurement(self):
|
def unit_of_measurement(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user