Optimize template 2 (#3521)
* Enforce compiling templates * Refactor templates * Add template validator to Logbook service * Some more fixes * Lint * Allow easy skipping of rfxtrx tests * Fix template bug in AND & OR conditions * add entities extractor Conflicts: tests/helpers/test_template.py * fix unittest * Convert template to be async * Fix Farcy * Lint fix * Limit template updates to related entities * Make template automation async
This commit is contained in:
parent
6694b0470e
commit
00e298206e
52 changed files with 841 additions and 562 deletions
|
@ -118,20 +118,6 @@ class TestMQTT(unittest.TestCase):
|
|||
}, blocking=True)
|
||||
self.assertFalse(mqtt.MQTT_CLIENT.publish.called)
|
||||
|
||||
def test_service_call_without_payload_or_payload_template(self):
|
||||
"""Test the service call without payload or payload template.
|
||||
|
||||
Send empty message if neither 'payload' nor 'payload_template'
|
||||
are provided.
|
||||
"""
|
||||
# Call the service directly because the helper functions require you to
|
||||
# provide a payload.
|
||||
self.hass.services.call(mqtt.DOMAIN, mqtt.SERVICE_PUBLISH, {
|
||||
mqtt.ATTR_TOPIC: "test/topic"
|
||||
}, blocking=True)
|
||||
self.assertTrue(mqtt.MQTT_CLIENT.publish.called)
|
||||
self.assertEqual(mqtt.MQTT_CLIENT.publish.call_args[0][1], "")
|
||||
|
||||
def test_service_call_with_ascii_qos_retain_flags(self):
|
||||
"""Test the service call with args that can be misinterpreted.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue