Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .coverage
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Dispense water with specified amount and carbonation level.
**Parameters:**

- `device_id` (required): The Blanco Unit device to dispense water from
- `amount_ml` (required): Amount of water in milliliters (100-1500, must be multiple of 100)
- `amount_ml` (required): Amount of water in milliliters, min 50ml
- `co2_intensity` (required): Carbonation level
- `1` = Still water
- `2` = Medium carbonation
Expand Down
6 changes: 2 additions & 4 deletions custom_components/blanco_unit/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,8 @@ async def dispense_water(self, amount_ml: int, co2_intensity: int) -> bool:
Raises:
ValueError: If amount or intensity is invalid.
"""
if not (100 <= amount_ml <= 1500):
raise ValueError("Amount must be between 100ml and 1500ml")
if amount_ml % 100 != 0:
raise ValueError("Amount must be a multiple of 100ml")
if amount_ml < 50:
raise ValueError("Amount must be at least 50ml")
if co2_intensity not in (1, 2, 3):
raise ValueError("CO2 intensity must be 1 (still), 2 (medium), or 3 (high)")

Expand Down
Loading
Loading