Files
core/homeassistant/components/point/const.py
T
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

19 lines
478 B
Python

"""Define constants for the Point component."""
from datetime import timedelta
DOMAIN = "point"
SCAN_INTERVAL = timedelta(minutes=1)
CONF_WEBHOOK_URL = "webhook_url"
CONF_REFRESH_TOKEN = "refresh_token"
EVENT_RECEIVED = "point_webhook_received"
SIGNAL_UPDATE_ENTITY = "point_update"
SIGNAL_WEBHOOK = "point_webhook"
POINT_DISCOVERY_NEW = "point_new_{}_{}"
OAUTH2_AUTHORIZE = "https://api.minut.com/v8/oauth/authorize"
OAUTH2_TOKEN = "https://api.minut.com/v8/oauth/token"