Skip to content

Commit

Permalink
Fix power button for disconnect mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zhbjsh committed Nov 2, 2024
1 parent b0d37af commit d49f02c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/ssh/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def available(self) -> bool:
return False

async def async_press(self) -> None:
if not self._manager.state.online:
if self._manager.is_down:
await self.coordinator.async_turn_on()

elif self._manager.state.connected:
elif self._manager.is_up:
await self.coordinator.async_turn_off()

0 comments on commit d49f02c

Please sign in to comment.