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
7 changes: 5 additions & 2 deletions homeassistant/components/device_tracker/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ def async_setup_scanner(hass, config, async_see, discovery_info=None):
@callback
def async_tracker_message_received(topic, payload, qos):
"""Handle received MQTT message."""
hass.async_add_job(
async_see(dev_id=dev_id_lookup[topic], location_name=payload))
for subscription in dev_id_lookup:
if mqtt._match_topic(subscription, topic):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trailing whitespace

hass.async_add_job(async_see(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trailing whitespace

dev_id=dev_id_lookup[subscription],
location_name=payload))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

trailing whitespace


for dev_id, topic in devices.items():
dev_id_lookup[topic] = dev_id
Expand Down