mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 13:27:09 +00:00
Allow [##:##:##:##:##] type device address in homeworks (#122872)
* Allow [##:##:##:##:##] type device address in homeworks * Simplify regex
This commit is contained in:
parent
823910b69e
commit
6d8bc84db3
@ -89,7 +89,7 @@ BUTTON_EDIT: VolDictType = {
|
||||
}
|
||||
|
||||
|
||||
validate_addr = cv.matches_regex(r"\[(?:\d\d:)?\d\d:\d\d:\d\d\]")
|
||||
validate_addr = cv.matches_regex(r"\[(?:\d\d:){2,4}\d\d\]")
|
||||
|
||||
|
||||
async def validate_add_controller(
|
||||
|
@ -436,7 +436,14 @@ async def test_options_add_remove_light_flow(
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("keypad_address", ["[02:08:03:01]", "[02:08:03]"])
|
||||
@pytest.mark.parametrize(
|
||||
"keypad_address",
|
||||
[
|
||||
"[02:08:03]",
|
||||
"[02:08:03:01]",
|
||||
"[02:08:03:01:00]",
|
||||
],
|
||||
)
|
||||
async def test_options_add_remove_keypad_flow(
|
||||
hass: HomeAssistant,
|
||||
mock_config_entry: MockConfigEntry,
|
||||
|
Loading…
x
Reference in New Issue
Block a user