mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Fixed close connection issue with rfxtrx device and update rfxtrx lib
This commit is contained in:
@@ -7,9 +7,9 @@ https://home-assistant.io/components/rfxtrx/
|
||||
import logging
|
||||
|
||||
from homeassistant.util import slugify
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
||||
|
||||
REQUIREMENTS = ['https://github.com/Danielhiversen/pyRFXtrx/' +
|
||||
'archive/0.5.zip#pyRFXtrx==0.5']
|
||||
REQUIREMENTS = ['pyRFXtrx==0.6.5']
|
||||
|
||||
DOMAIN = "rfxtrx"
|
||||
|
||||
@@ -72,6 +72,10 @@ def setup(hass, config):
|
||||
else:
|
||||
RFXOBJECT = rfxtrxmod.Core(device, handle_receive, debug=debug)
|
||||
|
||||
def _shutdown_rfxtrx(event):
|
||||
RFXOBJECT.close_connection()
|
||||
hass.bus.listen_once(EVENT_HOMEASSISTANT_STOP, _shutdown_rfxtrx)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user