updated rfxtrx lib

This commit is contained in:
Daniel 2016-02-11 14:15:51 +01:00
parent cdf0e80773
commit f938134069
4 changed files with 7 additions and 10 deletions

View File

@ -40,10 +40,6 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
datas = {ATTR_STATE: False, ATTR_FIREEVENT: fire_event}
rfxobject = rfxtrx.get_rfx_object(entity_info[ATTR_PACKETID])
if not isinstance(rfxobject.device, rfxtrxmod.LightDevice):
_LOGGER.exception("%s is not a light",
entity_info[ATTR_NAME])
return
new_light = RfxtrxLight(
entity_info[ATTR_NAME], rfxobject, datas
)
@ -54,7 +50,8 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
def light_update(event):
""" Callback for light updates from the RFXtrx gateway. """
if not isinstance(event.device, rfxtrxmod.LightDevice):
if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
not event.device.known_to_be_dimmable:
return
# Add entity if not exist and the automatic_add is True

View File

@ -9,8 +9,8 @@ https://home-assistant.io/components/rfxtrx/
import logging
from homeassistant.util import slugify
REQUIREMENTS = ['https://github.com/Danielhiversen/pyRFXtrx/archive/0.3.zip' +
'#RFXtrx==0.3']
REQUIREMENTS = ['https://github.com/Danielhiversen/pyRFXtrx/archive/0.4.zip' +
'#RFXtrx==0.4']
DOMAIN = "rfxtrx"

View File

@ -49,8 +49,8 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
def switch_update(event):
""" Callback for sensor updates from the RFXtrx gateway. """
if not isinstance(event.device, rfxtrxmod.SwitchDevice) or \
isinstance(event.device, rfxtrxmod.LightDevice):
if not isinstance(event.device, rfxtrxmod.LightingDevice) or \
event.device.known_to_be_dimmable:
return
# Add entity if not exist and the automatic_add is True

View File

@ -61,7 +61,7 @@ hikvision==0.4
# http://github.com/mala-zaba/Adafruit_Python_DHT/archive/4101340de8d2457dd194bca1e8d11cbfc237e919.zip#Adafruit_DHT==1.1.0
# homeassistant.components.rfxtrx
https://github.com/Danielhiversen/pyRFXtrx/archive/0.3.zip#RFXtrx==0.3
https://github.com/Danielhiversen/pyRFXtrx/archive/0.4.zip#RFXtrx==0.4
# homeassistant.components.sensor.netatmo
https://github.com/HydrelioxGitHub/netatmo-api-python/archive/43ff238a0122b0939a0dc4e8836b6782913fb6e2.zip#lnetatmo==0.4.0