Remove Ubee Router integration (ADR-0004) (#43809)

This commit is contained in:
Franck Nijhof 2020-12-01 17:06:49 +01:00 committed by GitHub
parent 8f3989e7d9
commit 24ba5bcbaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 0 additions and 92 deletions

View File

@ -959,7 +959,6 @@ omit =
homeassistant/components/twilio_call/notify.py
homeassistant/components/twilio_sms/notify.py
homeassistant/components/twitter/notify.py
homeassistant/components/ubee/device_tracker.py
homeassistant/components/ubus/device_tracker.py
homeassistant/components/ue_smart_radio/media_player.py
homeassistant/components/unifiled/*

View File

@ -475,7 +475,6 @@ homeassistant/components/tts/* @pvizeli
homeassistant/components/tuya/* @ollo69
homeassistant/components/twentemilieu/* @frenck
homeassistant/components/twinkly/* @dr1rrb
homeassistant/components/ubee/* @mzdrale
homeassistant/components/unifi/* @Kane610
homeassistant/components/unifiled/* @florisvdk
homeassistant/components/upb/* @gwww

View File

@ -1 +0,0 @@
"""The ubee component."""

View File

@ -1,79 +0,0 @@
"""Support for Ubee router."""
import logging
from pyubee import Ubee
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
CONF_MODEL = "model"
DEFAULT_MODEL = "detect"
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Required(CONF_HOST): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Optional(CONF_MODEL, default=DEFAULT_MODEL): vol.Any(
"EVW32C-0N",
"EVW320B",
"EVW321B",
"EVW3200-Wifi",
"EVW3226@UPC",
"DVW32CB",
"DDW36C",
),
}
)
def get_scanner(hass, config):
"""Validate the configuration and return a Ubee scanner."""
info = config[DOMAIN]
host = info[CONF_HOST]
username = info[CONF_USERNAME]
password = info[CONF_PASSWORD]
model = info[CONF_MODEL]
ubee = Ubee(host, username, password, model)
if not ubee.login():
_LOGGER.error("Login failed")
return None
scanner = UbeeDeviceScanner(ubee)
return scanner
class UbeeDeviceScanner(DeviceScanner):
"""This class queries a wireless Ubee router."""
def __init__(self, ubee):
"""Initialize the Ubee scanner."""
self._ubee = ubee
self._mac2name = {}
def scan_devices(self):
"""Scan for new devices and return a list with found device IDs."""
devices = self._get_connected_devices()
self._mac2name = devices
return list(devices)
def get_device_name(self, device):
"""Return the name of the given device or None if we don't know."""
return self._mac2name.get(device)
def _get_connected_devices(self):
"""List connected devices with pyubee."""
if not self._ubee.session_active():
self._ubee.login()
return self._ubee.get_connected_devices()

View File

@ -1,7 +0,0 @@
{
"domain": "ubee",
"name": "Ubee Router",
"documentation": "https://www.home-assistant.io/integrations/ubee",
"requirements": ["pyubee==0.10"],
"codeowners": ["@mzdrale"]
}

View File

@ -1863,9 +1863,6 @@ pytradfri[async]==7.0.4
# homeassistant.components.trafikverket_weatherstation
pytrafikverket==0.1.6.2
# homeassistant.components.ubee
pyubee==0.10
# homeassistant.components.uptimerobot
pyuptimerobot==0.0.5