Skip to content

Commit

Permalink
Remove keep_last_known_online_state functionality.
Browse files Browse the repository at this point in the history
It wasn't exposed anyway, and I feel the application level should deal with that logic anyway
  • Loading branch information
mill1000 committed Oct 6, 2023
1 parent c318d9a commit 043d599
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions msmart/device/AC/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ def __init__(self, ip: str, device_id: int, port: int, **kwargs) -> None:
device_type=DeviceType.AIR_CONDITIONER, **kwargs)

self._updating = False
self._keep_last_known_online_state = False
self._defer_update = False

self._beep_on = False
Expand Down Expand Up @@ -249,10 +248,7 @@ async def _send_command(self, command, ignore_response=False) -> None:

# No response from device
if responses is None:
# Set device offline unless keeping last known state
if not self._keep_last_known_online_state:
self._online = False

self._online = False
return

# Device is online if we received any response
Expand Down

0 comments on commit 043d599

Please sign in to comment.