mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 00:10:22 +00:00
[ln882h_ble_tracker] Use register_apply_action for stop_scan (#19523)
This commit is contained in:
@@ -34,12 +34,13 @@ def test_trigger_codegen(
|
||||
"set_manufacturer_uuid128((uint8_t*)(const uint8_t[16]){0xCD,0xAB,0xCD,0xAB,"
|
||||
"0xCD,0xAB,0xCD,0xAB,0xCD,0xAB,0xCD,0xAB,0xCD,0xAB,0xCD,0xAB})" in main_cpp
|
||||
)
|
||||
# scan-control actions: templatable continuous lambda + parented actions.
|
||||
# scan-control actions: templatable continuous lambda + stop_scan forwarded
|
||||
# straight to the tracker (register_apply_action, no action class).
|
||||
# Exactly one set_continuous: the bare start_scan emits none, pinning the
|
||||
# restore-configured-mode divergence from esp32 against a future default=.
|
||||
assert main_cpp.count("->set_continuous(") == 1
|
||||
assert "startscanaction_id->set_continuous(" in main_cpp
|
||||
assert "stopscanaction_id->set_parent(" in main_cpp
|
||||
assert main_cpp.count("->stop_scan();") == 1
|
||||
# scan_parameters continuous: false reaches the YAML-mode setter, not the
|
||||
# runtime override.
|
||||
assert "->set_configured_continuous(false)" in main_cpp
|
||||
|
||||
Reference in New Issue
Block a user