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:
Richard Cox authored and Pascal Vizeli committed 2017-07-27 08:58:34 +02:00
1 parent 9d5c61b2f0
commit 1e8c00ac02
2 files changed
+9 -1

No files matched your search

+2
View File
@@ -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():