Upgrade rfxtrx lib (#2974)

pull/2981/head
Daniel Høyer Iversen 2016-08-25 19:52:48 +02:00 committed by Paulus Schoutsen
parent 34f57ebdc9
commit 354f4b4740
3 changed files with 5 additions and 7 deletions

View File

@ -14,7 +14,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.helpers.entity import Entity
from homeassistant.const import (ATTR_ENTITY_ID, TEMP_CELSIUS)
REQUIREMENTS = ['pyRFXtrx==0.10.1']
REQUIREMENTS = ['pyRFXtrx==0.11.0']
DOMAIN = "rfxtrx"
@ -42,7 +42,7 @@ DATA_TYPES = OrderedDict([
('Total usage', 'W'),
('Sound', ''),
('Sensor Status', ''),
('Unknown', '')])
('Counter value', '')])
RECEIVED_EVT_SUBSCRIBERS = []
RFX_DEVICES = {}

View File

@ -84,7 +84,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
pkt_id = "".join("{0:02x}".format(x) for x in event.data)
_LOGGER.info("Automatic add rfxtrx.sensor: %s",
device_id)
pkt_id)
data_type = "Unknown"
for _data_type in DATA_TYPES:
@ -109,10 +109,8 @@ class RfxtrxSensor(Entity):
self.event = event
self._name = name
self.should_fire_event = should_fire_event
if data_type not in DATA_TYPES:
data_type = "Unknown"
self.data_type = data_type
self._unit_of_measurement = DATA_TYPES[data_type]
self._unit_of_measurement = DATA_TYPES.get(data_type, '')
def __str__(self):
"""Return the name of the sensor."""

View File

@ -293,7 +293,7 @@ pushetta==1.0.15
py-cpuinfo==0.2.3
# homeassistant.components.rfxtrx
pyRFXtrx==0.10.1
pyRFXtrx==0.11.0
# homeassistant.components.notify.xmpp
pyasn1-modules==0.0.8