Commit graph

348 commits

Author SHA1 Message Date
Steven B
393dee1524
Handle IP address changes properly for tplink (#108731)
* Update device config for SETUP_RETRY and use CONF_HOST on startup

* Make entry state checks use a constant

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-24 11:24:44 +01:00
Joost Lekkerkerker
c7db8a0bee
Add translation placeholders for TPLink power strip (#108710) 2024-01-24 08:23:39 +01:00
J. Nick Koston
87898b7487
Add 3C52A1 oui to tplink for tapo l5 devices (#108750) 2024-01-23 21:04:43 -05:00
Teemu R
52ede95c4f
Scrub internal data for newer tplink devices (#108704) 2024-01-23 09:08:03 +01:00
J. Nick Koston
60149e9b9e
Add OUI 5C628B to tplink (#108699)
Seen on 530E(US)
2024-01-23 07:21:44 +01:00
J. Nick Koston
f6bc5c98b3
Handle tplink credential change at run time (#108692) 2024-01-22 13:30:21 -10:00
J. Nick Koston
e94493f83d
Use more shorthand attributes in tplink (#108284)
* Use more shorthand attributes in tplink

* naming

* unused
2024-01-21 21:34:06 +01:00
Steven B
9b3d3b3b2d
Add authentication to tplink integration for newer devices (#105143)
* 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>
2024-01-21 16:25:12 +01:00
J. Nick Koston
554c27a31a
Clamp tplink color temp to valid range (#107695) 2024-01-09 17:08:49 -10:00
J. Nick Koston
f5e7631e84
Fix tplink overloading power strips (#104208) 2024-01-04 12:15:35 -10:00
J. Nick Koston
41f0eda712
Use shorthand attrs for tplink color temp min/max (#106796)
The valid_temperature_range property does a regex match over
every possible model. Avoid calling it more than once since
it will never change as its based on the model
2024-01-01 13:14:28 +01:00
J. Nick Koston
b800475242
Use shorthand attrs for more tplink light attributes (#106399)
* Use shorthand attrs for more tplink light attributes

supported_color_modes and features were having to be recalced every time
state was written

* preen
2023-12-26 07:28:40 +01:00
Ville Skyttä
24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Joost Lekkerkerker
ac53b78a0c
Deduplicate constants A-D (#105638) 2023-12-13 14:21:44 +01:00
c0ffeeca7
7222e2b2d6
T-add host field description (#104871) 2023-12-04 11:52:54 +01:00
J. Nick Koston
09df04fafe
Pickup tplink codeowner (#104189)
I am going to attempt a fix for https://github.com/home-assistant/core/issues/103977
via https://github.com/python-kasa/python-kasa/pull/538

I am picking up codeowner on this for the forseeable future to watch
for issues as well
2023-11-18 23:39:47 +01:00
J. Nick Koston
dc7d817398
Incease tplink setup timeout (#103671)
It can take longer than 5s to do the first update of the device
especially when the device is overloaded as seen in #103668

Wait 10 seconds for the discovery since when the power strips are loaded they cannot respond in time
2023-11-09 01:13:11 +01:00
Teemu R
f944c68e01
Bump python-kasa to 0.5.4 for tplink (#103038) 2023-10-31 19:54:51 -05:00
Toastme
c495d607d8
Update tplink manifest.json with 2 new MACs for KP200 (#101359)
* Update manifest.json with 2 new MACs for KP200

those MAC are missing from the list so there are not detected like the other K200 i have (like 68ff7b)

* run hassfest

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-10-04 21:09:24 +02:00
Joost Lekkerkerker
0cf32e74d6
Use shorthand attributes in Tp-link (#99888) 2023-09-08 12:36:46 +02:00
J. Nick Koston
d17ffff3e3
Retry tplink setup later if device has an unexpected mac address (#98784)
Retry tplink setup later if device has an unexpected serial

If the DHCP reservation changed and there is now a different tplink device at
the saved IP address, retry setup later to avoid cross linking devices
2023-08-27 19:00:39 +02:00
Joost Lekkerkerker
9ce033daeb
Use default translations by removing names from tplink descriptions (#98338) 2023-08-14 11:51:08 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
J. Nick Koston
0cc80a9d29
Add OUI to tplink diagnostics (#97646)
* Add OUI to tplink diagnostics

The main reason discovery does not work for new devices is we
are missing the OUI. Since we redact the whole mac address in
the diagnostics, this makes it difficult to fix. We now include
the OUI in the diagnostics

* fix: use cached mac

* fix: tests
2023-08-03 22:49:55 -04:00
J. Nick Koston
db5d1b10ea
Fix tplink child plug state reporting (#97658)
regressed in https://github.com/home-assistant/core/pull/96246
2023-08-03 12:35:22 +02:00
J. Nick Koston
53703448ec
Fix typo in tplink OUI (#97644)
The last two were reversed for https://ouilookup.com/search/788cb5
2023-08-03 12:20:35 +02:00
Franck Nijhof
c2bbb0b5db
Fix implicit use of device name in TPLink switch (#97293) 2023-07-27 09:22:22 +02:00
Joost Lekkerkerker
2dc86364f3
Migrate TPLink to has entity name (#96246) 2023-07-24 20:49:40 +02:00
Teemu R
e5747d3f4c
Bump python-kasa to 0.5.3 (#97088) 2023-07-23 09:42:54 -05:00
J. Nick Koston
b90137f4c6
Add another OUI to tplink (#97062) 2023-07-22 17:52:38 -05:00
Paulus Schoutsen
7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Franck Nijhof
4edec69637
Migrate integration services (T-V) to support translations (#96379) 2023-07-12 07:37:13 +02:00
J. Nick Koston
78a8f90488
Add additional tplink kasa OUI (#96383)
Found on another test device
2023-07-12 03:20:41 +02:00
J. Nick Koston
8bfe692eea
Update tplink dhcp discovery (#96191)
* Update tplink dhcp discovery

- Found a KP device with 54AF97
- Found ES devices also use the same OUIs as EP

* from issue 95028
2023-07-09 17:36:46 +02:00
Franck Nijhof
8138c85074
Fix missing name in TP-Link service descriptions (#96074) 2023-07-07 16:12:52 +02:00
J. Nick Koston
99badceecc
Bump python-kasa to 0.5.2 (#95716) 2023-07-02 12:09:20 -05:00
Erik Montnemery
a1a055f618
Add config entry only config schema to integrations s-z (#93910) 2023-06-01 20:05:11 +02:00
epenet
4663ad75a0
Fix lingering timer in tplink (#91806) 2023-04-21 16:52:23 +02:00
epenet
485a78e0cf
Improve light type hints in integrations (#90035)
* Improve light type hints in integrations

* Improve
2023-03-21 11:40:33 +01:00
Teemu R
a93b4e7197
Use device-native kelvins for tplink color temperature (#85646) 2023-02-21 12:52:50 -06:00
Teemu R
1d928f05fa
Update python-kasa to 0.5.1 (#88416) 2023-02-18 22:39:08 -06:00
Teemu R
5335dfbc67
Prefer effect over other light settings for tplink (#85642) 2023-02-14 10:29:11 -06:00
Teemu R
95476f46c2
Shorten tplink update cycle (#87399) 2023-02-14 10:15:47 -06:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Erik Montnemery
b0b1d8143f
Sort manifests 10 (#87031) 2023-02-08 20:41:50 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Ty Parker
a703aa1dff
Add repeat options to tplink sequence effect service (#86040)
Add repeat options to sequence effect service
2023-02-05 00:14:25 +01:00
Marc Mueller
45b4b0e990
Import ParamSpec from typing [Py310] (#86413)
* Import ParamSpec from typing [Py310]

* Update additional imports
2023-01-23 07:28:43 +01:00
GitHub Action
4d215e573c [ci skip] Translation update 2023-01-23 00:23:13 +00:00