mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
parent
f396a4593e
commit
a5081ac307
@ -91,5 +91,5 @@ class WOLSwitch(SwitchDevice):
|
|||||||
ping_cmd = 'ping -c 1 -W {} {}'.format(
|
ping_cmd = 'ping -c 1 -W {} {}'.format(
|
||||||
DEFAULT_PING_TIMEOUT, self._host)
|
DEFAULT_PING_TIMEOUT, self._host)
|
||||||
|
|
||||||
status = sp.getstatusoutput(ping_cmd)[0]
|
status = sp.call(ping_cmd, stdout=sp.DEVNULL)
|
||||||
self._state = not bool(status)
|
self._state = not bool(status)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user