mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
fix WOL in docker/jail (#6810)
* fix WOL in docker/jail add ip_address parameter to send_magic_packet if host specific. in docker/jail, WOL doesn't works due to subnet broadcast issues. * Update wake_on_lan.py lint
This commit is contained in:
parent
c53de19246
commit
b8c1bc9542
@ -75,7 +75,11 @@ class WOLSwitch(SwitchDevice):
|
|||||||
|
|
||||||
def turn_on(self):
|
def turn_on(self):
|
||||||
"""Turn the device on."""
|
"""Turn the device on."""
|
||||||
self._wol.send_magic_packet(self._mac_address)
|
if self._host:
|
||||||
|
self._wol.send_magic_packet(self._mac_address,
|
||||||
|
ip_address=self._host)
|
||||||
|
else:
|
||||||
|
self._wol.send_magic_packet(self._mac_address)
|
||||||
|
|
||||||
def turn_off(self):
|
def turn_off(self):
|
||||||
"""Turn the device off if an off action is present."""
|
"""Turn the device off if an off action is present."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user