Add native Python types support to templates (#41227)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
Franck Nijhof
2020-10-07 00:05:52 +02:00
committed by GitHub
parent cbb4324c84
commit ee914366a8
29 changed files with 349 additions and 282 deletions

View File

@@ -123,7 +123,7 @@ async def test_service_call_with_template_payload_renders_template(hass, mqtt_mo
mqtt.async_publish_template(hass, "test/topic", "{{ 1+1 }}")
await hass.async_block_till_done()
assert mqtt_mock.async_publish.called
assert mqtt_mock.async_publish.call_args[0][1] == "2"
assert mqtt_mock.async_publish.call_args[0][1] == 2
async def test_service_call_with_payload_doesnt_render_template(hass, mqtt_mock):