'Instantiate a template.'

def __init__(self, template, hass=None):

    if (not isinstance(template, str)):
        raise TypeError('Expected    template    to    be    a    string')
    self.template = template
    self._compiled_code = None
    self._compiled = None
    self.hass = hass
