Commit graph

277 commits

Author SHA1 Message Date
Fredrik Erlandsson
88c751df7a
Fix point calls config entry to a platform multiple times (#126535)
* fix multiple async_forward_entry_setups calls

* ensure entity is at the right place
2024-09-23 20:09:07 +02:00
epenet
f5852b4678
Move point base entity to separate module (#126551) 2024-09-23 15:58:20 +02:00
Fredrik Erlandsson
1768daf98c
Add support for native oauth2 in Point (#118243)
* initial oauth2 implementation

* fix unload_entry

* read old yaml/entry config

* update tests

* fix: pylint on tests

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* fix constants, formatting

* use runtime_data

* Apply suggestions from code review

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* fix missing import

* adopt to PointData dataclass

* fix typing

* add more strings (copied from weheat)

* move the PointData dataclass to avoid circular imports

* use configflow inspired by withings

* raise ConfigEntryAuthFailed

* it is called entry_lock

* fix webhook issue

* fix oauth_create_entry

* stop using async_forward_entry_setup

* Fixup

* fix strings

* fix issue that old config might be without unique_id

* parametrize tests

* Update homeassistant/components/point/config_flow.py

* Update tests/components/point/test_config_flow.py

* Fix

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-20 12:02:07 +02:00
epenet
6bc2d11c5e
Add base Entity class to enforce-class-module pylint plugin (#126026)
* Add base Entity class to enforcé-class-module pylint plugin

* Ignore bluetooth

* Ignore hue

* Ignore dominos

* Ignore ffmpeg

* Ignore mqtt

* Ignore microsoft_face

* Ignore plant

* Ignore point

* Ignore rfxtrx

* Ignore template

* Ignore tag

* Ignore deconz
2024-09-18 20:38:45 +02:00
Jan-Philipp Benecke
4efa147a2b
Use debug/warning instead of info log level in components [p] (#126139) 2024-09-17 19:44:38 +02:00
epenet
18e2c2f6dd
Disable pylint ignore_missing_annotations in config flow (#125322)
* Disable pylint ignore_missing_annotations in config flow

* Add tests

* Ignore point
2024-09-16 11:53:29 +02:00
epenet
e750f8f457
Add alias to DOMAIN import (part 4) (#125563)
* Add alias to DOMAIN import (part 4)

* Simplify

* More integration

* Apply suggestions from code review

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Revert "Apply suggestions from code review"

This reverts commit 07471d3629.

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-09-09 21:32:33 +02:00
epenet
913e5404da
Improve config flow type hints (part 1) (#124343)
* Improve config flow type hints

* Revert sms
2024-08-21 22:42:58 +02:00
epenet
9ca398ef82
Improve type hints in webhook implementations (#121588) 2024-07-09 12:05:23 +02:00
G Johansson
2a4f7439a2
Fix Alarm control panel not require code in several integrations (#118961) 2024-06-06 13:21:30 +02:00
J. Nick Koston
ed0568c655
Ensure config entries are not unloaded while their platforms are setting up (#118767)
* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* Report non-awaited/non-locked config entry platform forwards

Its currently possible for config entries to be reloaded while their platforms
are being forwarded if platform forwards are not awaited or done after the
config entry is setup since the lock will not be held in this case.

In https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards
we advised to await platform forwards to ensure this does not happen, however
for sleeping devices and late discovered devices, platform forwards may happen
later.

If config platform forwards are happening during setup, they should be awaited

If config entry platform forwards are not happening during setup, instead
async_late_forward_entry_setups should be used which will hold the lock to
prevent the config entry from being unloaded while its platforms are being
setup

* run with error on to find them

* cert_exp, hold lock

* cert_exp, hold lock

* shelly async_late_forward_entry_setups

* compact

* compact

* found another

* patch up mobileapp

* patch up hue tests

* patch up smartthings

* fix mqtt

* fix esphome

* zwave_js

* mqtt

* rework

* fixes

* fix mocking

* fix mocking

* do not call async_forward_entry_setup directly

* docstrings

* docstrings

* docstrings

* add comments

* doc strings

* fixed all in core, turn off strict

* coverage

* coverage

* missing

* coverage
2024-06-04 21:34:39 -04:00
Fredrik Erlandsson
d1904941c1
Fix issue with device_class.capitalize() in point (#117969) 2024-05-24 10:35:44 +02:00
epenet
ae5769dc50
Downgrade point quality scale to silver (#117783) 2024-05-20 11:06:56 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Joost Lekkerkerker
d0a1781187
Remove entity description in Point (#112921) 2024-03-11 12:02:26 +01:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] (#112736) 2024-03-08 19:15:59 +01:00
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] (#112702) 2024-03-08 15:04:07 +01:00
Marc Mueller
8ca127df2a
Use KEY_HASS [h-z] (#112610) 2024-03-07 18:03:44 +01:00
Erik Montnemery
e0c1feb22c
Migrate integrations n-r to generic flowhandler (#111864) 2024-02-29 20:09:01 +01:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +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
Fredrik Erlandsson
d654c4bc1e
Fix device_class.capitalize() in Point (#101440) 2023-10-06 18:23:18 +02:00
Fredrik Erlandsson
5975974a37
Bumb pypoint to 2.3.2 (#101436)
version bumb point
2023-10-05 08:36:58 +02:00
Joost Lekkerkerker
75951dd67b
Use shorthand attributes in Point (#100214) 2023-09-12 10:15:36 -05:00
Marc Mueller
063ce9159d
Use asyncio.timeout [o-s] (#98451) 2023-08-15 17:21:49 +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
Jan-Philipp Benecke
55beb26190
Fix authlib version constraint required by point (#97228) 2023-07-27 08:54:20 +02:00
Erik Montnemery
a71c097aeb
Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
Erik Montnemery
67c1051305
Allow setting an entity's name by its device class (#90767)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-09 18:55:55 +02:00
epenet
f69d76702a
Adjust entity registry access in integrations (2) (#88947) 2023-03-01 08:02:51 +01:00
Erik Montnemery
1450b44c63
Sort manifests 7 (#87028) 2023-02-08 20:32:43 +01:00
epenet
1b23429f41
Add __init__ return type to integrations (#87637) 2023-02-07 15:55:14 +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
epenet
bb3e0633a4
Add init return type to integrations (#87523)
Add type hints to integrations
2023-02-06 11:37:25 +01:00
Franck Nijhof
4b27af6a8f
Re-enabled Ruff E713 (#87301) 2023-02-03 16:18:33 +01:00
GitHub Action
77f9548e51 [ci skip] Translation update 2023-01-15 00:25:52 +00:00
GitHub Action
cfa08c5229 [ci skip] Translation update 2022-12-15 00:24:38 +00:00
GitHub Action
b9753a9f92 [ci skip] Translation update 2022-12-13 00:27:47 +00:00
GitHub Action
1e0345a377 [ci skip] Translation update 2022-12-10 00:21:35 +00:00
GitHub Action
f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
epenet
0edcb26844
Use SoundPressure unit and device class in point (#83580) 2022-12-08 20:57:38 +01:00
GitHub Action
3ab9a14ce7 [ci skip] Translation update 2022-12-06 00:21:31 +00:00
GitHub Action
5f9290e572 [ci skip] Translation update 2022-12-05 00:23:07 +00:00
GitHub Action
03154e1d83 [ci skip] Translation update 2022-12-03 00:21:50 +00:00
GitHub Action
0d1f476bee [ci skip] Translation update 2022-12-01 00:33:36 +00:00
GitHub Action
197e71203b [ci skip] Translation update 2022-11-30 00:26:16 +00:00
Franck Nijhof
d769359b4f
Remove invalid custom device class from MinutPoint sound sensor (#82934) 2022-11-29 17:22:01 +01:00
GitHub Action
230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
GitHub Action
b65d8cc1b3 [ci skip] Translation update 2022-11-28 00:23:09 +00:00
GitHub Action
f3b3193f7a [ci skip] Translation update 2022-11-25 00:24:19 +00:00