[remote_base] Size the receiver lists by the busiest receiver and hoist attach_receiver

This commit is contained in:
J. Nick Koston
2026-09-11 08:41:41 -05:00
parent 798400908e
commit 03409b0818
8 changed files with 86 additions and 40 deletions
@@ -5,16 +5,18 @@ esp32:
board: esp32dev
remote_receiver:
- id: rcvr
- id: rcvr_ir
pin: GPIO4
- id: rcvr_rf
pin: GPIO5
infrared:
- platform: ir_rf_proxy
name: IR Receiver
remote_receiver_id: rcvr
remote_receiver_id: rcvr_ir
radio_frequency:
- platform: ir_rf_proxy
name: RF Receiver
frequency: 433.92MHz
remote_receiver_id: rcvr
remote_receiver_id: rcvr_rf
@@ -37,8 +37,9 @@ def test_proxy_receivers_count_as_listeners(
component_config_path: Callable[[str], Path],
) -> None:
generate_main(component_config_path("receiver_with_proxies.yaml"))
# infrared and radio_frequency ir_rf_proxy platforms each listen
assert get_define_value("REMOTE_BASE_LISTENER_COUNT") == "2"
# one proxy entity listens on each of the two receivers; every receiver's list gets the
# capacity of the busiest one, so this is the largest per receiver count, not the sum
assert get_define_value("REMOTE_BASE_LISTENER_COUNT") == "1"
assert get_define_value("REMOTE_BASE_DUMPER_COUNT") is None