Problems with SNMP

HI all,

Since couple of days I get this error after reboot:
HA Version: 0.103.4

snmpwalk -v 1 -c public 192.168.100.28

iso.3.6.1.2.1.43.11.1.1.8.1.1 = INTEGER: 257
iso.3.6.1.2.1.43.11.1.1.8.1.2 = INTEGER: 267
iso.3.6.1.2.1.43.11.1.1.8.1.3 = INTEGER: 258
iso.3.6.1.2.1.43.11.1.1.8.1.4 = INTEGER: 543

iso.3.6.1.2.1.43.11.1.1.9.1.1 = INTEGER: 251
iso.3.6.1.2.1.43.11.1.1.9.1.2 = INTEGER: 261
iso.3.6.1.2.1.43.11.1.1.9.1.3 = INTEGER: 252
iso.3.6.1.2.1.43.11.1.1.9.1.4 = INTEGER: 532

It was always working correct.

---
platform: snmp
name: "HP Cur Black"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.9.1.4
accept_errors: true
scan_interval: 86400
---
platform: snmp
name: "HP Cur Cyan"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.9.1.1
accept_errors: true
scan_interval: 86400
---
platform: snmp
name: "HP Cur Magenta"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.9.1.2
accept_errors: true
scan_interval: 86400
---
platform: snmp
name: "HP Cur Yellow"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.9.1.3
accept_errors: true
scan_interval: 86400
---
platform: snmp
name: "HP Max Black"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.8.1.4
accept_errors: true
scan_interval: 3600
---
platform: snmp
name: "HP Max Cyan"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.8.1.1
accept_errors: true
scan_interval: 86400
---
platform: snmp
name: "HP Max Magenta"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.8.1.2
accept_errors: true
scan_interval: 86400
---
platform: snmp
name: "HP Max Yellow"
host: 192.168.100.28
baseoid: iso.3.6.1.2.1.43.11.1.1.8.1.3
accept_errors: true
scan_interval: 86400
---
platform: template
sensors:
  hp_black_ink:
    friendly_name: "HP Black Ink Level"
    unit_of_measurement: "%"
    value_template: "{{ ((states('sensor.hp_cur_black') | float) / (states('sensor.hp_max_black') | float) * 100) | round(0) }}"
---
platform: template
sensors:
  hp_magenta_ink:
    friendly_name: "HP Magenta Ink Level"
    unit_of_measurement: "%"
    value_template: "{{ ((states('sensor.hp_cur_magenta') | float) / (states('sensor.hp_max_magenta') | float) * 100) | round(0) }}"
---
platform: template
sensors:
  hp_cyan_ink:
    friendly_name: "HP Cyan Ink Level"
    unit_of_measurement: "%"
    value_template: "{{ ((states('sensor.hp_cur_cyan') | float) / (states('sensor.hp_max_cyan') | float) * 100) | round(0) }}"
---
platform: template
sensors:
  hp_yellow_ink:
    friendly_name: "HP Yellow Ink Level"
    unit_of_measurement: "%"
    value_template: "{{ ((states('sensor.hp_cur_yellow') | float) / (states('sensor.hp_max_yellow') | float) * 100) | round(0) }}"
2019-12-29 10:54:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.hp_black_ink fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  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 222, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero

2019-12-29 10:54:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.hp_cyan_ink fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  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 222, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero

2019-12-29 10:54:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.hp_magenta_ink fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  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 222, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero

2019-12-29 10:54:36 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.hp_yellow_ink fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 281, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
    await self.async_update()
  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 222, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python3.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.7/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
ZeroDivisionError: float division by zero

Updates to 0.103.5 ,maybe this did the trick. But also add

version: ā€œ2cā€

to the sensors.

Since then the errors are gone.