mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Upgrade rfxtrx lib (#2974)
This commit is contained in:
parent
34f57ebdc9
commit
354f4b4740
@ -14,7 +14,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.const import (ATTR_ENTITY_ID, TEMP_CELSIUS)
|
from homeassistant.const import (ATTR_ENTITY_ID, TEMP_CELSIUS)
|
||||||
|
|
||||||
REQUIREMENTS = ['pyRFXtrx==0.10.1']
|
REQUIREMENTS = ['pyRFXtrx==0.11.0']
|
||||||
|
|
||||||
DOMAIN = "rfxtrx"
|
DOMAIN = "rfxtrx"
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ DATA_TYPES = OrderedDict([
|
|||||||
('Total usage', 'W'),
|
('Total usage', 'W'),
|
||||||
('Sound', ''),
|
('Sound', ''),
|
||||||
('Sensor Status', ''),
|
('Sensor Status', ''),
|
||||||
('Unknown', '')])
|
('Counter value', '')])
|
||||||
|
|
||||||
RECEIVED_EVT_SUBSCRIBERS = []
|
RECEIVED_EVT_SUBSCRIBERS = []
|
||||||
RFX_DEVICES = {}
|
RFX_DEVICES = {}
|
||||||
|
@ -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)
|
pkt_id = "".join("{0:02x}".format(x) for x in event.data)
|
||||||
_LOGGER.info("Automatic add rfxtrx.sensor: %s",
|
_LOGGER.info("Automatic add rfxtrx.sensor: %s",
|
||||||
device_id)
|
pkt_id)
|
||||||
|
|
||||||
data_type = "Unknown"
|
data_type = "Unknown"
|
||||||
for _data_type in DATA_TYPES:
|
for _data_type in DATA_TYPES:
|
||||||
@ -109,10 +109,8 @@ class RfxtrxSensor(Entity):
|
|||||||
self.event = event
|
self.event = event
|
||||||
self._name = name
|
self._name = name
|
||||||
self.should_fire_event = should_fire_event
|
self.should_fire_event = should_fire_event
|
||||||
if data_type not in DATA_TYPES:
|
|
||||||
data_type = "Unknown"
|
|
||||||
self.data_type = data_type
|
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):
|
def __str__(self):
|
||||||
"""Return the name of the sensor."""
|
"""Return the name of the sensor."""
|
||||||
|
@ -293,7 +293,7 @@ pushetta==1.0.15
|
|||||||
py-cpuinfo==0.2.3
|
py-cpuinfo==0.2.3
|
||||||
|
|
||||||
# homeassistant.components.rfxtrx
|
# homeassistant.components.rfxtrx
|
||||||
pyRFXtrx==0.10.1
|
pyRFXtrx==0.11.0
|
||||||
|
|
||||||
# homeassistant.components.notify.xmpp
|
# homeassistant.components.notify.xmpp
|
||||||
pyasn1-modules==0.0.8
|
pyasn1-modules==0.0.8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user