Migrate MQTT from jsonpath to templates

This commit is contained in:
Paulus Schoutsen committed 2015-12-10 21:39:01 -08:00
1 parent d55fda28c2
commit 9a9ecb5916
7 files changed
+30 -46

No files matched your search

+1 -2
View File
@@ -47,7 +47,7 @@ class TestSensorMQTT(unittest.TestCase):
'name': 'test',
'state_topic': 'test-topic',
'unit_of_measurement': 'fav unit',
'state_format': 'json:val'
'value_template': '{{ value_json.val }}'
}
}))
@@ -56,4 +56,3 @@ class TestSensorMQTT(unittest.TestCase):
state = self.hass.states.get('sensor.test')
self.assertEqual('100', state.state)
+1 -1
View File
@@ -90,7 +90,7 @@ class TestSensorMQTT(unittest.TestCase):
'command_topic': 'command-topic',
'payload_on': 'beer on',
'payload_off': 'beer off',
'state_format': 'json:val'
'value_template': '{{ value_json.val }}'
}
}))