I have some errors in log
2022-11-29 18:34:57.812 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}")
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1701, in forgiving_float_filter
return float(value)
TypeError: float() argument must be a string or a real number, not 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 420, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1933, in _render_with_context
return template.render(**kwargs)
File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1704, in forgiving_float_filter
raise_no_default("float", value)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1402, in raise_no_default
raise ValueError(
ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 536, in async_render_to_info
render_info._result = self.async_render(variables, strict=strict, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 422, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified
2022-11-29 18:34:57.834 ERROR (MainThread) [homeassistant.components.template.light] Received invalid light is_on state: unknown for entity light.faretti_sala_1. Expected: on, off, true, false
2022-11-29 18:34:57.847 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified') while processing template 'Template("{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}")' for attribute '_brightness' in entity 'light.faretti_sala_1'
2022-11-29 18:35:41.649 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified') while processing template 'Template("{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}")' for attribute '_brightness' in entity 'light.faretti_sala_1'
2022-11-29 18:36:22.403 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified') while processing template 'Template("{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}")' for attribute '_brightness' in entity 'light.faretti_sala_1'
2022-11-29 18:36:23.939 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified') while processing template 'Template("{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}")' for attribute '_brightness' in entity 'light.faretti_sala_1'
2022-11-29 18:37:05.497 ERROR (MainThread) [homeassistant.helpers.template_entity] TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}' but no default was specified') while processing template 'Template("{% set b = state_attr('light.0xa4c13830306c281a_l1', 'brightness') | float %} {{ (1.783 * b - 199.7) | int }}")' for attribute '_brightness' in entity 'light.faretti_sala_1'