mirror of
https://github.com/home-assistant/core.git
synced 2025-11-05 08:59:57 +00:00
Fix issue with creation of PT2262 devices in rfxtrx integration (#38074)
This commit is contained in:
@@ -14,6 +14,7 @@ from homeassistant.core import callback
|
||||
|
||||
from . import (
|
||||
CONF_AUTOMATIC_ADD,
|
||||
CONF_DATA_BITS,
|
||||
DATA_TYPES,
|
||||
SIGNAL_EVENT,
|
||||
RfxtrxEntity,
|
||||
@@ -64,7 +65,7 @@ async def async_setup_entry(
|
||||
return isinstance(event, (ControlEvent, SensorEvent))
|
||||
|
||||
entities = []
|
||||
for packet_id in discovery_info[CONF_DEVICES]:
|
||||
for packet_id, entity in discovery_info[CONF_DEVICES].items():
|
||||
event = get_rfx_object(packet_id)
|
||||
if event is None:
|
||||
_LOGGER.error("Invalid device: %s", packet_id)
|
||||
@@ -72,7 +73,7 @@ async def async_setup_entry(
|
||||
if not supported(event):
|
||||
continue
|
||||
|
||||
device_id = get_device_id(event.device)
|
||||
device_id = get_device_id(event.device, data_bits=entity.get(CONF_DATA_BITS))
|
||||
for data_type in set(event.values) & set(DATA_TYPES):
|
||||
data_id = (*device_id, data_type)
|
||||
if data_id in data_ids:
|
||||
|
||||
Reference in New Issue
Block a user