1
0
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:
Richard Cox
2017-07-26 23:58:34 -07:00
committed by Pascal Vizeli
parent 9d5c61b2f0
commit 1e8c00ac02
2 changed files with 9 additions and 1 deletions

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():