mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 20:39:01 +00:00
Add config validator helper positive_float (#41640)
This commit is contained in:
@@ -64,9 +64,7 @@ PLATFORM_SCHEMA = vol.Schema(
|
||||
vol.Optional(CONF_SCOPE, default=DEFAULT_SCOPE): vol.In(
|
||||
SCOPE_TYPES
|
||||
),
|
||||
vol.Optional(CONF_DEVICE): vol.All(
|
||||
vol.Coerce(int), vol.Range(min=0)
|
||||
),
|
||||
vol.Optional(CONF_DEVICE): cv.positive_int,
|
||||
}
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user