def _log_message(self):
    template = (template_cv.get() or '')
    _LOGGER.warning("Template variable warning: %s when rendering '%s'", self._undefined_message, template)
def _log_message(self):
    template = (template_cv.get() or )
    _LOGGER.warning("Template variable warning: %s when rendering '%s'", self._undefined_message, template)