Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/tplink/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
cv.ensure_list_csv, [vol.Coerce(int)], HSV_SEQUENCE
),
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(
cv.ensure_list,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/tplink/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,4 @@ random_effect:
number:
min: 1
step: 1
max: 100
max: 600
3 changes: 2 additions & 1 deletion tests/components/tplink/test_light.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ async def test_smart_strip_custom_random_effect(hass: HomeAssistant) -> None:
{
ATTR_ENTITY_ID: entity_id,
"init_states": [340, 20, 50],
"random_seed": 600,
},
blocking=True,
)
Expand All @@ -539,7 +540,7 @@ async def test_smart_strip_custom_random_effect(hass: HomeAssistant) -> None:
"transition": 0,
"type": "random",
"init_states": [[340, 20, 50]],
"random_seed": 100,
"random_seed": 600,
}
)
strip.set_custom_effect.reset_mock()
Expand Down