Stop UpdateIndex if there is an error

This commit is contained in:
Carsten Schmiemann 2023-07-16 13:14:29 +02:00
parent 4897387ab0
commit 0771aacf20

View file

@ -142,6 +142,7 @@ class NodeRedGridMeter:
logging.debug("---");
# increment UpdateIndex - to show that new data is available
if self._dbusservice['/Connected'] == 1 :
index = self._dbusservice['/UpdateIndex'] + 1 # increment index
if index > 255: # maximum value of the index
index = 0 # overflow from 255 to 0