mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
ssh aruba
This commit is contained in:
parent
e91c8e4143
commit
7f87df20c2
@ -12,7 +12,6 @@ from datetime import timedelta
|
|||||||
import re
|
import re
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
|
||||||
from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD
|
from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD
|
||||||
from homeassistant.helpers import validate_config
|
from homeassistant.helpers import validate_config
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
@ -45,6 +44,7 @@ def get_scanner(hass, config):
|
|||||||
|
|
||||||
class ArubaDeviceScanner(object):
|
class ArubaDeviceScanner(object):
|
||||||
""" This class queries a Aruba Acces Point for connected devices. """
|
""" This class queries a Aruba Acces Point for connected devices. """
|
||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.host = config[CONF_HOST]
|
self.host = config[CONF_HOST]
|
||||||
self.username = config[CONF_USERNAME]
|
self.username = config[CONF_USERNAME]
|
||||||
@ -113,10 +113,10 @@ class ArubaDeviceScanner(object):
|
|||||||
_LOGGER.error("Host key Changed")
|
_LOGGER.error("Host key Changed")
|
||||||
return
|
return
|
||||||
elif query == 5:
|
elif query == 5:
|
||||||
#_LOGGER.error("Connection refused by server")
|
_LOGGER.error("Connection refused by server")
|
||||||
return
|
return
|
||||||
elif query == 6:
|
elif query == 6:
|
||||||
#_LOGGER.error("Connection timed out")
|
_LOGGER.error("Connection timed out")
|
||||||
return
|
return
|
||||||
ssh.sendline(self.password)
|
ssh.sendline(self.password)
|
||||||
ssh.expect('#')
|
ssh.expect('#')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user