Correctly close lacrosse on homeassistant stop (#47555)
Since lacrosse.close() takes no arguments, but was directly added as a listener to EVENT_HOMEASSISTANT_STOP, the following occured on shutdown: Traceback (most recent call last): File "/usr/lib/python/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) TypeError: close() takes 1 positional argument but 2 were given
This commit is contained in:
parent
48f1a55a28
commit
4018d0a152
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
_LOGGER.warning("Unable to open serial port: %s", exc)
|
||||
return False
|
||||
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, lacrosse.close)
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, lambda event: lacrosse.close())
|
||||
|
||||
if CONF_JEELINK_LED in config:
|
||||
lacrosse.led_mode_state(config.get(CONF_JEELINK_LED))
|
||||
|
|
Loading…
Add table
Reference in a new issue