hwmland / homeassistant-xmrpool_stat

XMR Pool Statistics integration for Home Assistant
MIT License
5 stars 2 forks source link

Error logged when not mining #5

Closed pinkywafer closed 2 years ago

pinkywafer commented 2 years ago

When no miners are running, errors are being recorded in the Home Assistant logs:

2022-01-13 18:19:25 ERROR (MainThread) [homeassistant.components.sensor] xmrpool_stat: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update
await task
File "/config/custom_components/xmrpool_stat/sensor.py", line 236, in async_update
self._value = self._controller.GetValue(None, "hashrate").split()
AttributeError: 'NoneType' object has no attribute 'split'