W00D00 / home-assistant-elero

Elero Centero component
GNU General Public License v3.0
39 stars 10 forks source link

Fix Shutdown Error #36

Closed dfigus closed 1 year ago

dfigus commented 2 years ago

The handler for the Homeassistant shutdown event is missing the event parameter and results in a TypeError when Homeassistant is stopped.

HA Log entry during shutdown:

ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
TypeError: close_serial_ports() takes 0 positional arguments but 1 was given

This PR fixes the missing event parameter.

dfigus commented 2 years ago

@W00D00 Could you please take a look it this and merge if this is fine?

W00D00 commented 1 year ago

Many thanks @dfigus for your contribution and kindly sorry for this very long delay in my response.