Skip to content

Commit

Permalink
Make rfxtrx sensor not crash when unknown sensor is discovered
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel authored and Daniel committed Jul 11, 2016
1 parent 6b9e1f3 commit 3b14189
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions homeassistant/components/sensor/rfxtrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
sub_sensors = {}
data_types = entity_info[ATTR_DATA_TYPE]
if len(data_types) == 0:
data_type = "Unknown"
for data_type in DATA_TYPES:
if data_type in event.values:
data_types = [data_type]
Expand Down

0 comments on commit 3b14189

Please sign in to comment.