'Send a templated message.'

def test_sending_templated_message(self):

    self._setup_notify()
    self.hass.states.set('sensor.temperature', 10)
    notify.send_message(self.hass, '{{    states.sensor.temperature.state    }}', '{{    states.sensor.temperature.name    }}')
    self.hass.block_till_done()
    last_event = self.events[(-1)]
    self.assertEqual(last_event.data[notify.ATTR_TITLE], 'temperature')
    self.assertEqual(last_event.data[notify.ATTR_MESSAGE], '10')
