OK, small update, possibly could help tracing down the issue…
I finally got to the point of updating in similar way calculated sensors, that throuws so many errors into log file. Change to verify upfront if sensor should be calculate did not helped. I still get in log following errors (shown here per one sensopr):
2020-07-05 19:02:19 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.sds_task_completed_0 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/template/sensor.py", line 224, in async_update
self._state = self._template.async_render()
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 228, in async_render
return compiled.render(kwargs).strip()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero
2020-07-05 19:02:19 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.sds_task_completed_0 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/template/sensor.py", line 224, in async_update
self._state = self._template.async_render()
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 228, in async_render
return compiled.render(kwargs).strip()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero
I can’t judge for the first one at all, second seems to be strange, as there should not be division by zero, as dividor sensor value is unavailable