mirror of
https://github.com/home-assistant/core.git
synced 2025-05-20 13:59:15 +00:00

* Add authentication flows to tplink integration to enable newer device protocol support * Add websession passing to tplink integration discover methods * Use SmartDevice.connect() * Update to use DeviceConfig * Use credential hashes * Bump python-kasa to 0.6.0.dev0 * Fix tests and address review comments * Add autodetection for L530, P110, and L900 This adds mac address prefixes for the devices I have. The wildcards are left quite lax assuming different series may share the same prefix. * Bump tplink to 0.6.0.dev1 * Add config flow tests * Use short_mac if alias is None and try legacy connect on discovery timeout * Add config_flow tests * Add init tests * Migrate to aiohttp * add some more ouis * final * ip change fix * add fixmes * fix O(n) searching * fix O(n) searching * move code that cannot fail outside of try block * fix missing reauth_successful string * add doc strings, cleanups * error message by password * dry * adjust discovery timeout * integration discovery already formats mac * tweaks * cleanups * cleanups * Update post review and fix broken tests * Fix TODOs and FIXMEs in test_config_flow * Add pragma no cover * bump, apply suggestions * remove no cover * use iden check * Apply suggestions from code review * Fix branched test and update integration title * legacy typing * Update homeassistant/components/tplink/__init__.py * lint * Remove more unused consts * Update test docstrings * Add sdb9696 to tplink codeowners * Update docstring on test for invalid DeviceConfig * Update test stored credentials test --------- Co-authored-by: Teemu Rytilahti <tpr@iki.fi> Co-authored-by: J. Nick Koston <nick@koston.org>
21 lines
546 B
Python
21 lines
546 B
Python
"""Const for TP-Link."""
|
|
from __future__ import annotations
|
|
|
|
from typing import Final
|
|
|
|
from homeassistant.const import Platform
|
|
|
|
DOMAIN = "tplink"
|
|
|
|
DISCOVERY_TIMEOUT = 5 # Home Assistant will complain if startup takes > 10s
|
|
CONNECT_TIMEOUT = 5
|
|
|
|
ATTR_CURRENT_A: Final = "current_a"
|
|
ATTR_CURRENT_POWER_W: Final = "current_power_w"
|
|
ATTR_TODAY_ENERGY_KWH: Final = "today_energy_kwh"
|
|
ATTR_TOTAL_ENERGY_KWH: Final = "total_energy_kwh"
|
|
|
|
CONF_DEVICE_CONFIG: Final = "device_config"
|
|
|
|
PLATFORMS: Final = [Platform.LIGHT, Platform.SENSOR, Platform.SWITCH]
|