mdegat01 / addon-amr2mqtt

HA Addon which runs rtlamr to read IDM power meter data and send to MQTT broker
MIT License
29 stars 14 forks source link

Accept and ignore positional arguments shutdown #77

Closed mdegat01 closed 1 year ago

mdegat01 commented 1 year ago

Fix this error on stop

Traceback (most recent call last):
Signal caught, exiting!
  File "/amr2mqtt/amr2mqtt.py", line 388, in main_loop
    amr_line = rtlamr.stdout.readline().strip()
TypeError: shutdown() takes 0 positional arguments but 2 were given
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/amr2mqtt/amr2mqtt.py", line 520, in <module>
    main_loop()
  File "/amr2mqtt/amr2mqtt.py", line 507, in main_loop
    time.sleep(2)
TypeError: shutdown() takes 0 positional arguments but 2 were given
Signal caught, exiting!