Commit graph

348 commits

Author SHA1 Message Date
Steven B.
556deb4f77
Fix tplink number platform to use intended BOX mode (#126397)
The NumberMode should be BOX as per the entity description but due to the missing dataclass decorator was resolving to NumberMode.AUTO.
2024-09-21 19:03:51 +02:00
Teemu R.
992b810fa9
Add siren platform for tplink (#124934)
* Add siren platform for tplink

* Add tests

* Add alarm to features.json

* Update based on reviews

* Use alarm module instead of individual features

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-20 16:11:02 +02:00
Jan-Philipp Benecke
39e720caed
Use debug/warning instead of info log level in components [t] (#126147) 2024-09-18 12:39:50 +02:00
Steven B.
40ee39f258
Update tplink config to include aes keys (#125685) 2024-09-10 13:52:10 -05:00
Steven B.
aa8f98392d
Bump tplink python-kasa lib to 0.7.3 (#125686) 2024-09-10 19:35:18 +02:00
Steven B.
29a17edaa5
Exclude tplink firmware entities (#124935)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-30 08:56:30 -10:00
Steven B.
ed161d3d49
Bump python-kasa to 0.7.2 (#124930) 2024-08-30 08:43:28 -10:00
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +02:00
J. Nick Koston
743df84569
Reduce multiple calls to calculate sensor unit in tplink (#124606)
accessing unit on the feature is not cached and it had
to be looked up every time
2024-08-26 13:49:26 +02:00
Steven B.
61cee043e6
Do not report tplink discovery failures as legacy connection failures (#124432)
* Do not report discovery failures as legacy connection failures

* Fix catching BaseException
2024-08-23 10:17:48 -05:00
Steven B.
7276b4b3ad
Bump python-kasa to 0.7.1 (#122967) 2024-07-31 13:31:53 -05:00
Steven B.
9db42beade
Fix handling of tplink light effects for scenes (#122965)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-07-31 12:57:12 -05:00
G Johansson
ca4c617d4b
Add TURN_OFF/TURN_ON feature flags for fan (#121447) 2024-07-19 11:35:24 +02:00
Steven B.
cf0aef079b
Bump tplink dependency python-kasa to 0.7.0.5 (#122119) 2024-07-18 15:20:10 -05:00
Steven B.
55cee89392
Update tplink device config during reauth flow (#122089) 2024-07-17 14:07:53 -05:00
Steven B
e269ff617c
Bump python-kasa to 0.7.0.4 (#121791) 2024-07-11 19:19:31 +02:00
J. Nick Koston
8fb700c30e
Add some missing tplink ouis (#121785) 2024-07-11 17:18:45 +02:00
Steven B
2148cfc899
Fix tplink bug changing color temp on bulbs with light effects (#121696) 2024-07-11 10:10:47 -05:00
Steven B
d42dced852
Fix tplink light effect behaviour when activating a scene (#121288) 2024-07-05 11:19:04 +02:00
Steven B
4958e8e5c1
Bump python-kasa to 0.7.0.3 (#121183) 2024-07-04 04:31:58 -05:00
Teemu R
90d622cd02
Minor polishing for tplink (#120868) 2024-07-02 08:23:07 +02:00
Steven B
38aa6bcf19
Bump python-kasa to 0.7.0.2 (#120940) 2024-07-01 16:50:35 +02:00
Steven B
9758b08036
Update tplink unlink identifiers to deal with ids from other domains (#120596) 2024-06-27 07:54:34 -05:00
Steven B
970dd99226
Store tplink credentials_hash outside of device_config (#120597) 2024-06-27 07:34:12 -05:00
Teemu R
fc2968bc1b
Adjust tplink codeowners (#120561) 2024-06-26 14:35:22 +02:00
Teemu R
4290a1fcb5
Upgrade tplink with new platforms, features and device support (#120060)
Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
Co-authored-by: sdb9696 <steven.beth@gmail.com>
Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Teemu R. <tpr@iki.fi>
2024-06-25 22:01:21 +02:00
Marc Mueller
bcd1243686
Use VolDictType to improve schema typing (#120417) 2024-06-25 15:15:59 +02:00
Marc Mueller
25d1ca747b
Use PEP 695 for decorator typing (3) (#117640) 2024-05-17 16:27:32 +02:00
J. Nick Koston
269429aa0c
Only calculate the tplink emeter values once per update cycle (#115587)
The sensor platform has to read the native_value multiple times
during the state write cycle which means the integration calculated
the value multiple times. Switch to using _attr_native_value to
ensure the calculations in the library are only done once per
state write.

To demonstrate this issue,
+        _LOGGER.warning("Fetch name value for %s", self.entity_id)
was added to `def native_value`:
```
2024-04-14 06:58:52.506 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_current_consumption
2024-04-14 06:58:52.506 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_total_consumption
2024-04-14 06:58:52.507 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_today_s_consumption
2024-04-14 06:58:52.507 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_voltage
2024-04-14 06:58:52.508 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_current
2024-04-14 06:58:52.509 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_current_consumption
2024-04-14 06:58:52.510 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_total_consumption
2024-04-14 06:58:52.510 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_today_s_consumption
2024-04-14 06:58:52.510 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_voltage
2024-04-14 06:58:52.510 WARNING (MainThread) [homeassistant.components.tplink.sensor] Fetch name value for sensor.kasa_smart_plug_542b_0_kasa_smart_plug_542b_0_current
```
2024-04-14 20:38:28 +02:00
J. Nick Koston
ee535ee611
Ensure test async_create_task eager start behavior matches production (#115517) 2024-04-13 15:58:52 -05:00
Steven B
bf3eb463ae
Wrap tplink exceptions caused by user actions inside HomeAssistantError (#114919) 2024-04-08 22:35:25 -10:00
Sid
9cbed10372
Enable Ruff PYI041 (#115229) 2024-04-08 09:29:05 -10:00
Joost Lekkerkerker
96cebdf096
Improve lists in integrations [T-U] (#113243) 2024-03-13 17:54:46 +01:00
Paulus Schoutsen
f416d67d21
Remove built-in support for import_executor in manifest (#112725) 2024-03-08 12:02:32 -05:00
Marc Mueller
062cc4bfce
Add empty line after module docstring [t-v] (#112705) 2024-03-08 10:35:23 -05:00
Joost Lekkerkerker
c8a30cfda7
Add icon translations to TP-Link (#112317) 2024-03-05 14:19:08 +01:00
Erik Montnemery
b0ed8c4961
Migrate integrations s-t to generic flowhandler (#111865) 2024-02-29 22:16:14 +01:00
J. Nick Koston
59b7f8d103
Fix tplink blocking startup by waiting for discovery (#111788)
* Fix tplink blocking statup by waiting for discovery

* remove started
2024-02-28 21:34:08 -05:00
J. Nick Koston
f71343a3ba
Import tplink in the executor to avoid blocking the event loop (#111691)
* Import tplink in the executor to avoid blocking the event loop

2024-02-27 22:44:19.908 DEBUG (MainThread) [homeassistant.loader] Component tplink import took 1.620 seconds (loaded_executor=False)

* patch out discovery because it happens too fast now
2024-02-28 15:06:33 +01:00
Teemu R
e0490a3ade
Improve tplink authenticate description wording (#111250) 2024-02-23 15:19:28 -10:00
J. Nick Koston
98a8714705
Improve error reporting in tplink config flow (#111166)
* Improve error reporting in tplink config flow

* coverage, fixes
2024-02-23 02:38:46 +01:00
J. Nick Koston
ae49b3a274
Add async_schedule_reload helper to the ConfigEntries manager (#110912)
* Add async_schedule_reload helper to the ConfigEntries manager

We have cases where the the setup retry kicks in right before
the reload happens causing the reload to fail with
OperationNotAllowed. The async_schedule_reload will
cancel the setup retry before the async_reload task
is created to avoid this problem.

I updated a few integrations that were most likely
to have this problem. Future PRs will do a more
extensive audit

* coverage

* revert for now since this needs more refactoring in a followup

* cover

* cleanup and fixes
2024-02-20 02:14:45 +01:00
J. Nick Koston
cd1c633ff9
Fix tplink not updating IP from DHCP discovery and discovering twice (#110557)
We only called format_mac on the mac address if we connected
to the device during entry creation. Since the format of the
mac address from DHCP discovery did not match the format saved
in the unique id, the IP would not get updated and a second
discovery would appear

Thankfully the creation path does format the mac so we did not
create any entries with an inconsistantly formatted unique id

fixes #110460
2024-02-14 23:03:30 +01:00
Erik Montnemery
2e194c4ec3
Fix light color mode in tplink (#109831) 2024-02-07 15:39:36 +01:00
Teemu R
5f1d20c5e2
Add new OUIs for tplink (#109437) 2024-02-03 07:50:33 +01:00
Teemu R
e61864c0b5
Bump python-kasa to 0.6.2.1 (#109397) 2024-02-02 21:24:24 +01:00
Teemu R
6f88cd3273
Bump python-kasa to 0.6.2 (#109064) 2024-01-29 10:19:44 -10:00
J. Nick Koston
7667024a2f
Remove extra confirmation step in tplink authenticated discovery flow (#109016)
Remove extra confirmation step in tplink discovery flow

After discovery, and manually entering credentials, we would ask
the user if they still wanted to set up the device. Instead we
now set create the config entry as soon as they enter correct
credentials as its clear that they want to proceed.
2024-01-28 20:23:07 +01:00
Teemu R
3965f20526
Bump python-kasa to 0.6.1 (#108831) 2024-01-25 10:50:01 +01:00
Erik Montnemery
4a2a7872fb
Fix light color mode in tplink (#108760) 2024-01-24 15:28:40 +01:00