'Test for firing on boolean change.'

def test_if_fires_on_change_bool(self):

    assert setup_component(self.hass, automation.DOMAIN, {automation.DOMAIN: {'trigger': {'platform': 'template', 'value_template': '{{    true    }}'}, 'action': {'service': 'test.automation'}}})
    self.hass.states.set('test.entity', 'world')
    self.hass.block_till_done()
    self.assertEqual(1, len(self.calls))
    automation.turn_off(self.hass)
    self.hass.block_till_done()
    self.hass.states.set('test.entity', 'planet')
    self.hass.block_till_done()
    self.assertEqual(1, len(self.calls))
