I’m a python noob, but i want something changed to the output on the LCD of my emonpi.
The below text from the python-script should generate an output of a rounded value, instead of a decimal value, and negative values should be shown as an Absolute value with IN (for positive values, or OUT (in case the value was negative)
if page == 3:
if r.get(“feed1”) is not None:
lcd[0] = feed1_name + ‘:’ + r.get(“feed1”) + feed1_unit
else:
lcd[0] = feed1_name + ‘:’ + “—”
if r.get("feed2") is not None:
lcd[1] = feed2_name + ':' + r.get("feed2") + feed2_unit
else:
lcd[1] = feed2_name + ':' + "---"
How to accomplish this?