From 2526937271627b35c01d6778f1041f7e6b8a43a6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 11 Sep 2026 06:42:47 -0500 Subject: [PATCH] [remote_base] List the valid protocol names in the request_protocol error --- esphome/components/remote_base/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/esphome/components/remote_base/__init__.py b/esphome/components/remote_base/__init__.py index 7edb8b042f9..dc0fd74a3c7 100644 --- a/esphome/components/remote_base/__init__.py +++ b/esphome/components/remote_base/__init__.py @@ -145,7 +145,9 @@ _PROTOCOL_STEMS = sorted( def request_protocol(name: str) -> None: """Keep a protocol's source file in the build; components using it from C++ must call this.""" if _protocol_stem(name) not in _PROTOCOL_STEMS: - raise ValueError(f"Unknown remote protocol {name!r}") + raise ValueError( + f"Unknown remote protocol {name!r}; expected one of {', '.join(_PROTOCOL_STEMS)}" + ) cg.add_define(protocol_define(name))