Skip to content

Commit

Permalink
Fix can't set attribute error (Closes: #176)
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Dec 27, 2021
1 parent 0dbc247 commit 3f55098
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions custom_components/xiaomi_miio_fan/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,6 @@ def __init__(self, name, device, model, unique_id, retries, preset_modes_overrid
self._preset_modes = list(FAN_PRESET_MODES_ZA5)
if preset_modes_override is not None:
self._preset_modes = preset_modes_override


self._state_attrs.update(
{attribute: None for attribute in self._available_attributes}
Expand Down Expand Up @@ -1672,8 +1671,7 @@ def __init__(
lazy_discover: bool = True,
model: str = MODEL_FAN_ZA5,
) -> None:
super().__init__(ip, token, start_id, debug, lazy_discover)
self.model = model
super().__init__(ip, token, start_id, debug, lazy_discover, model=model)

def status(self):
"""Retrieve properties."""
Expand Down

0 comments on commit 3f55098

Please sign in to comment.