mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Adding support for mapping keys to value in statsd (#8665)
* Adding ability to map specific states to values * Adding test for mapping
This commit is contained in:
committed by
Pascal Vizeli
parent
9d5c61b2f0
commit
1e8c00ac02
@@ -86,6 +86,7 @@ class TestStatsd(unittest.TestCase):
|
||||
config = {
|
||||
'statsd': {
|
||||
'host': 'host',
|
||||
'value_mapping': {'custom': 3}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,6 +99,7 @@ class TestStatsd(unittest.TestCase):
|
||||
|
||||
valid = {'1': 1,
|
||||
'1.0': 1.0,
|
||||
'custom': 3,
|
||||
STATE_ON: 1,
|
||||
STATE_OFF: 0}
|
||||
for in_, out in valid.items():
|
||||
|
||||
Reference in New Issue
Block a user