Skip to content

Commit

Permalink
Add Omnilogic switch defaults for max_speed and min_speed (#51889)
Browse files Browse the repository at this point in the history
  • Loading branch information
djtimca committed Jun 16, 2021
1 parent 13bf5db commit dc9f141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/omnilogic/switch.py
Expand Up @@ -153,8 +153,8 @@ def __init__(
state_key=state_key,
)

self._max_speed = int(coordinator.data[item_id]["Max-Pump-Speed"])
self._min_speed = int(coordinator.data[item_id]["Min-Pump-Speed"])
self._max_speed = int(coordinator.data[item_id].get("Max-Pump-Speed", 100))
self._min_speed = int(coordinator.data[item_id].get("Min-Pump-Speed", 0))

if "Filter-Type" in coordinator.data[item_id]:
self._pump_type = PUMP_TYPES[coordinator.data[item_id]["Filter-Type"]]
Expand Down

0 comments on commit dc9f141

Please sign in to comment.