1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-18 07:56:03 +01:00

Allow to disable seconds in DurationSelector (#163803)

This commit is contained in:
Kevin Stillhammer
2026-02-24 15:11:26 +01:00
committed by GitHub
parent 6dc8840932
commit 5543107f6c
2 changed files with 7 additions and 2 deletions

View File

@@ -1304,14 +1304,16 @@ def test_attribute_selector_schema(
(
{},
(
{"seconds": 10},
{
"seconds": 10
}, # Seconds is allowed also if `enable_second` is not set
{"days": 10}, # Days is allowed also if `enable_day` is not set
{"milliseconds": 500},
),
(None, {}, {"seconds": -1}),
),
(
{"enable_day": True, "enable_millisecond": True},
{"enable_day": True, "enable_millisecond": True, "enable_second": True},
({"seconds": 10}, {"days": 10}, {"milliseconds": 500}),
(None, {}, {"seconds": -1}),
),