hass-core/homeassistant/components/mikrotik/const.py
Rami Mosleh 9432054066
Rework Mikrotik device scanning following Unifi (#27484)
* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* rework device scanning, add tests

* update requirements and coverage

* fix description comments

* update tests, fix disabled entity updates

* update librouteros to 3.0.0

* fix sorting

* fix sorting 2

* revert to 2.3.0 as 3.0.0 requires code update

* fix requirements

* apply fixes

* fix tests

* update hub.py and fix tests

* fix test_hub_setup_failed

* rebased on dev and update librouteros to 3.0.0

* fixed test_config_flow

* fixed tests

* fix test_config_flow
2020-01-30 10:21:51 -08:00

48 lines
1 KiB
Python

"""Constants used in the Mikrotik components."""
DOMAIN = "mikrotik"
DEFAULT_NAME = "Mikrotik"
DEFAULT_API_PORT = 8728
DEFAULT_DETECTION_TIME = 300
ATTR_MANUFACTURER = "Mikrotik"
ATTR_SERIAL_NUMBER = "serial-number"
ATTR_FIRMWARE = "current-firmware"
ATTR_MODEL = "model"
CONF_ARP_PING = "arp_ping"
CONF_FORCE_DHCP = "force_dhcp"
CONF_DETECTION_TIME = "detection_time"
NAME = "name"
INFO = "info"
IDENTITY = "identity"
ARP = "arp"
CAPSMAN = "capsman"
DHCP = "dhcp"
WIRELESS = "wireless"
IS_WIRELESS = "is_wireless"
MIKROTIK_SERVICES = {
ARP: "/ip/arp/getall",
CAPSMAN: "/caps-man/registration-table/getall",
DHCP: "/ip/dhcp-server/lease/getall",
IDENTITY: "/system/identity/getall",
INFO: "/system/routerboard/getall",
WIRELESS: "/interface/wireless/registration-table/getall",
IS_WIRELESS: "/interface/wireless/print",
}
ATTR_DEVICE_TRACKER = [
"comment",
"mac-address",
"ssid",
"interface",
"signal-strength",
"signal-to-noise",
"rx-rate",
"tx-rate",
"uptime",
]