diff --git a/homeassistant/components/switch/wake_on_lan.py b/homeassistant/components/switch/wake_on_lan.py index d9f7d0ad637..ba3439dc951 100644 --- a/homeassistant/components/switch/wake_on_lan.py +++ b/homeassistant/components/switch/wake_on_lan.py @@ -86,10 +86,10 @@ class WOLSwitch(SwitchDevice): """Check if device is on and update the state.""" if platform.system().lower() == 'windows': ping_cmd = ['ping', '-n', '1', '-w', - str(DEFAULT_PING_TIMEOUT * 1000), self._host] + str(DEFAULT_PING_TIMEOUT * 1000), str(self._host)] else: ping_cmd = ['ping', '-c', '1', '-W', - str(DEFAULT_PING_TIMEOUT), self._host] + str(DEFAULT_PING_TIMEOUT), str(self._host)] status = sp.call(ping_cmd, stdout=sp.DEVNULL) self._state = not bool(status)