Fix rfxtrx device id matching (#15819)

* Issue #15773

Fix PT2262 devices are incorrectly matched in rfxtrx component

* style
This commit is contained in:
Daniel Høyer Iversen 2018-08-04 15:23:57 +02:00 committed by Paulus Schoutsen
parent dbe44c076e
commit c7a8f1143c

View File

@ -166,6 +166,7 @@ def get_pt2262_device(device_id):
"""Look for the device which id matches the given device_id parameter."""
for device in RFX_DEVICES.values():
if (hasattr(device, 'is_lighting4') and
device.masked_id is not None and
device.masked_id == get_pt2262_deviceid(device_id,
device.data_bits)):
_LOGGER.debug("rfxtrx: found matching device %s for %s",