Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions homeassistant/components/sensor/rfxtrx.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@ def sensor_update(event):

if device_id in rfxtrx.RFX_DEVICES:
sensors = rfxtrx.RFX_DEVICES[device_id]
for key in sensors:
sensor = sensors[key]
for data_type in sensors:
if data_type not in event.values:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment to describe this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done

continue
sensor = sensors[data_type]
sensor.event = event
# Fire event
if sensors[key].should_fire_event:
if sensor.should_fire_event:
sensor.hass.bus.fire(
"signal_received", {
ATTR_ENTITY_ID: sensors[key].entity_id,
ATTR_ENTITY_ID: sensor.entity_id,
}
)
return
Expand Down