Skip to content

Commit

Permalink
Allow negative accept cost and rate
Browse files Browse the repository at this point in the history
  • Loading branch information
dala318 committed Jan 29, 2024
1 parent d55e7ef commit 1f1ca6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/nordpool_planner/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def optional_entity_id(value: Any) -> str:
),
vol.Optional(VAR_DURATION_ENTITY, default=""): optional_entity_id,
vol.Optional(ACCEPT_COST, default=0.0): vol.All(
vol.Coerce(float), vol.Range(min=0.0, max=10000.0)
vol.Coerce(float), vol.Range(min=-10000.0, max=10000.0)
),
vol.Optional(ACCEPT_RATE, default=0.0): vol.All(
vol.Coerce(float), vol.Range(min=0.0, max=10000.0)
vol.Coerce(float), vol.Range(min=-10000.0, max=10000.0)
),
# Moving planner exclusives
vol.Exclusive(MOVING, TYPE_GROUP, msg=TYPE_DUPLICATE_MSG): {
Expand Down

0 comments on commit 1f1ca6f

Please sign in to comment.