[output] Name the channel key in the duplicate-channel error

This commit is contained in:
J. Nick Koston committed 2026-10-29 18:39:14 -10:00
1 parent c3146d8f6a
commit 443c2caa0c
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -142,7 +142,7 @@ def final_validate_unique_channel(
domain=DOMAIN,
platform=platform,
keys=(hub_key, channel_key),
message="Channel '{1}' of '{0}' is already used by another output",
message=f"{channel_key.capitalize()} '{{1}}' of '{{0}}' is already used by another output",
)
+1 -1
View File
@@ -107,5 +107,5 @@ def test_hub_channel_key_can_be_renamed(set_core_config: SetCoreConfigCallable)
full["output"] = entries
set_core_config(PlatformFramework.ESP32_IDF, full_config=full)
validate(entries[1])
with pytest.raises(cv.Invalid, match="Channel '3' of 'a' is already used"):
with pytest.raises(cv.Invalid, match="Pin '3' of 'a' is already used"):
validate(entries[2])