Fixed close connection issue with rfxtrx device and update rfxtrx lib

This commit is contained in:
Daniel committed 2016-03-14 08:33:59 +01:00
1 parent 399fda079f
commit d6344d6492
6 files changed
+15 -18

No files matched your search

+6 -2
View File
@@ -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