How can i resolve this error? thanks a lot
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'energyCharging'
2022-07-22 09:28:01 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'energyCharging'') while processing template 'Template("{% set energy = state_attr('sensor.zcsazzurro','total')['energyCharging'] | float(0) %} {{ energy | round(2) }}")' for attribute '_attr_native_value' in entity 'sensor.carica_totale'
2022-07-22 09:28:02 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
How can i resolve this error? thanks a lot homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'energyCharging' 2022-07-22 09:28:01 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('UndefinedError: 'None' has no attribute 'energyCharging'') while processing template 'Template("{% set energy = state_attr('sensor.zcsazzurro','total')['energyCharging'] | float(0) %} {{ energy | round(2) }}")' for attribute '_attr_native_value' in entity 'sensor.carica_totale' 2022-07-22 09:28:02 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session