Skip to content

Commit

Permalink
Upgrade rfxtrx lib (home-assistant#2974)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielhiversen authored and balloob committed Aug 25, 2016
1 parent 34f57eb commit 354f4b4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/rfxtrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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"

Expand Down Expand Up @@ -42,7 +42,7 @@
('Total usage', 'W'),
('Sound', ''),
('Sensor Status', ''),
('Unknown', '')])
('Counter value', '')])

RECEIVED_EVT_SUBSCRIBERS = []
RFX_DEVICES = {}
Expand Down
6 changes: 2 additions & 4 deletions homeassistant/components/sensor/rfxtrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def sensor_update(event):

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:
Expand All @@ -109,10 +109,8 @@ def __init__(self, event, name, data_type, should_fire_event=False):
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."""
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 354f4b4

Please sign in to comment.