Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove keep_last_known_online_state functionality. #87

Merged
merged 1 commit into from
Oct 6, 2023
Merged
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
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