'Test for firing on no change with template advanced.'

def test_if_fires_on_no_change_with_template_advanced(self):

    assert setup_component(self.hass, automation.DOMAIN, {automation.DOMAIN: {'trigger': {'platform': 'template', 'value_template': '{%-    if    is_state("test.entity",    "world")    -%}\n                                                                                                                                                                    true\n                                                                                                                                                                    {%-    else    -%}\n                                                                                                                                                                    false\n                                                                                                                                                                    {%-    endif    -%}'}, 'action': {'service': 'test.automation'}}})
    self.hass.states.set('test.entity', 'worldz')
    self.hass.block_till_done()
    self.assertEqual(0, len(self.calls))
    self.hass.states.set('test.entity', 'hello')
    self.hass.block_till_done()
    self.assertEqual(0, len(self.calls))
