Increase tplink effects random seed allowed range to 1-600 (#69725)

* Increase tplink effects random seed allowed range to 1-600

Reported https://community.home-assistant.io/t/tp-link-integration-support-for-kl430-led-light-strip/190635/62?u=bdraco

* cover
This commit is contained in:
J. Nick Koston 2022-04-08 21:08:17 -10:00 committed by GitHub
parent d76fb2d891
commit 689b347904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -101,7 +101,7 @@ RANDOM_EFFECT_DICT: Final = {
cv.ensure_list_csv, [vol.Coerce(int)], HSV_SEQUENCE cv.ensure_list_csv, [vol.Coerce(int)], HSV_SEQUENCE
), ),
vol.Optional("random_seed", default=100): vol.All( vol.Optional("random_seed", default=100): vol.All(
vol.Coerce(int), vol.Range(min=1, max=100) vol.Coerce(int), vol.Range(min=1, max=600)
), ),
vol.Optional("backgrounds"): vol.All( vol.Optional("backgrounds"): vol.All(
cv.ensure_list, cv.ensure_list,

View File

@ -180,4 +180,4 @@ random_effect:
number: number:
min: 1 min: 1
step: 1 step: 1
max: 100 max: 600

View File

@ -523,6 +523,7 @@ async def test_smart_strip_custom_random_effect(hass: HomeAssistant) -> None:
{ {
ATTR_ENTITY_ID: entity_id, ATTR_ENTITY_ID: entity_id,
"init_states": [340, 20, 50], "init_states": [340, 20, 50],
"random_seed": 600,
}, },
blocking=True, blocking=True,
) )
@ -539,7 +540,7 @@ async def test_smart_strip_custom_random_effect(hass: HomeAssistant) -> None:
"transition": 0, "transition": 0,
"type": "random", "type": "random",
"init_states": [[340, 20, 50]], "init_states": [[340, 20, 50]],
"random_seed": 100, "random_seed": 600,
} }
) )
strip.set_custom_effect.reset_mock() strip.set_custom_effect.reset_mock()