1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

remote_receiver: use config parent receiver for registering dumpers (#1980)

This commit is contained in:
Jesse Hills
2021-07-06 10:15:29 +12:00
committed by GitHub
parent 79b9d0579d
commit 062cedc200
2 changed files with 7 additions and 4 deletions

View File

@@ -176,7 +176,9 @@ validate_binary_sensor = cv.validate_registry_entry(
TRIGGER_REGISTRY = SimpleRegistry()
DUMPER_REGISTRY = Registry(
{
cv.GenerateID(CONF_RECEIVER_ID): cv.use_id(RemoteReceiverBase),
cv.Optional(CONF_RECEIVER_ID): cv.invalid(
"This has been removed in ESPHome 1.20.0 and the dumper attaches directly to the parent receiver."
),
}
)
@@ -228,8 +230,6 @@ async def build_dumpers(config):
dumpers = []
for conf in config:
dumper = await cg.build_registry_entry(DUMPER_REGISTRY, conf)
receiver = await cg.get_variable(conf[CONF_RECEIVER_ID])
cg.add(receiver.register_dumper(dumper))
dumpers.append(dumper)
return dumpers