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
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:
This PR fixes the missing event parameter.