Add configurable decimal rounding of display value for CoinMarketCap sensor and upgrade to 5.0.3 (#14437) (#14604)
This commit is contained in:
1 parent
143be49c66
commit
b4f8d52fb1
5 files changed
+93
-53
No files matched your search
@@ -11,8 +11,9 @@ from tests.common import (
|
||||
|
||||
VALID_CONFIG = {
|
||||
'platform': 'coinmarketcap',
|
||||
'currency': 'ethereum',
|
||||
'currency_id': 1027,
|
||||
'display_currency': 'EUR',
|
||||
'display_currency_decimals': 3
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +40,6 @@ class TestCoinMarketCapSensor(unittest.TestCase):
|
||||
state = self.hass.states.get('sensor.ethereum')
|
||||
assert state is not None
|
||||
|
||||
assert state.state == '240.47'
|
||||
assert state.state == '493.455'
|
||||
assert state.attributes.get('symbol') == 'ETH'
|
||||
assert state.attributes.get('unit_of_measurement') == 'EUR'
|
||||
Reference in new issue
Block a user