1
0
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:
Daniel
2016-03-14 08:25:04 +01:00
parent 399fda079f
commit d6344d6492
6 changed files with 15 additions and 18 deletions

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