'Log an error nicely if the template cannot be interpreted.'

@staticmethod
def handle_template_exception(ex, field):

    if (ex.args and ex.args[0].startswith("UndefinedError:    'None'    has    no    attribute")):
        _LOGGER.warning(ex)
        return
    _LOGGER.error('Error    parsing    template    for    field    %s', field)
    _LOGGER.error(ex)
