Skip to content

Commit

Permalink
cv.positive_float isn't available
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Oct 28, 2020
1 parent 8fb6a9a commit b220980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miio_plug/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
)

SERVICE_SCHEMA_POWER_PRICE = SERVICE_SCHEMA.extend(
{vol.Required(ATTR_PRICE): cv.positive_float}
{vol.Required(ATTR_PRICE): vol.All(vol.Coerce(float), vol.Range(min=0))}
)

SERVICE_TO_METHOD = {
Expand Down

0 comments on commit b220980

Please sign in to comment.