Traceback (most recent call last):


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 249, in async_update_ha_state

await self.async_device_update()


 "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 417, in async_device_update

await self.async_update()


 "/usr/src/homeassistant/homeassistant/components/template/sensor.py", line 220, in async_update

self._state = self._template.async_render()


 "/usr/src/homeassistant/homeassistant/helpers/template.py", line 215, in async_render

return compiled.render(kwargs).strip()


 "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render

return original_render(self, *args, **kwargs)


 "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render

return self.environment.handle_exception(exc_info, True)


 "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception

reraise(exc_type, exc_value, tb)


 "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise

raise value.with_traceback(tb)


 "<template>", line 1, in top-level template code
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'

Traceback (most recent call last):


 "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/__init__.py", line 68, in pluginData

response = api_plugin.on_api_get(request)


 "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 280, in on_api_get

if refresh_repository or not self._is_repository_cache_valid():


 "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager/__init__.py", line 797, in _is_repository_cache_valid

return mtime + self._repository_cache_ttl >= time.time() > mtime
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
