Commit Graph

36 Commits (35bf584a9ccd02e60447844b287fda259b8ae13a)

Author SHA1 Message Date
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
jesperraemaekers dfcfe78732
Add weheat core integration (#123057)
* Add empty weheat integration

* Add first sensor to weheat integration

* Add weheat entity to provide device information

* Fixed automatic selection for a single heat pump

* Replaced integration specific package and removed status sensor

* Update const.py

* Add reauthentication support for weheat integration

* Add test cases for the config flow of the weheat integration

* Changed API and OATH url to weheat production environment

* Add empty weheat integration

* Add first sensor to weheat integration

* Add weheat entity to provide device information

* Fixed automatic selection for a single heat pump

* Replaced integration specific package and removed status sensor

* Add reauthentication support for weheat integration

* Update const.py

* Add test cases for the config flow of the weheat integration

* Changed API and OATH url to weheat production environment

* Resolved merge conflict after adding weheat package

* Apply suggestions from code review

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

* Added translation keys, more type info and version bump the weheat package

* Adding native property value for weheat sensor

* Removed reauth, added weheat sensor description and changed discovery of heat pumps

* Added unique ID of user to entity

* Replaced string by constants, added test case for duplicate unique id

* Removed duplicate constant

* Added offline scope

* Removed re-auth related code

* Simplified oath implementation

* Cleanup tests for weheat integration

* Added oath scope to tests

---------

Co-authored-by: kjell-van-straaten <kjell.van.straaten@wefabricate.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-06 11:58:01 +02:00
Allen Porter c01bb44757
Add Google Photos integration (#124835)
* Add Google Photos integration

* Mark credentials typing

* Add code review suggestions to simpilfy google_photos

* Update tests/components/google_photos/conftest.py

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

* Apply suggestions from code review

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

* Fix comment typo

* Update test fixtures from review feedback

* Remove unnecessary test for services

* Remove keyword argument

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 07:27:19 -07:00
J. Nick Koston 03ead27f6c
Split august and yale integrations (#124677)
* Split august and yale integrations [part 1] (#122253)

* merge with dev

* Remove unused constant

* Remove yale IPv6 workaround (#123409)

* Convert yale to use oauth (#123806)

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

* Update yale for switch from pubnub to websockets (#124675)

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-28 17:46:03 +02:00
Paolo Burgio c1c5cff993
Add integration for iotty Smart Home (#103073)
* Initial import 0.0.2

* Fixes to URL, and removed commits

* Initial import 0.0.2

* Fixes to URL, and removed commits

* Added first test for iotty

* First release

* Reviewers request #1
- Removed clutter
- Added support for new naming convention for IottySmartSwitch entity

* Removed commmented code

* Some modifications

* Modified REST EP for iotty CloudApi

* Initial import 0.0.2

* Fixes to URL, and removed commits

* Added first test for iotty

* First release

* Rebased and resolved conflicts

* Reviewers request #1
- Removed clutter
- Added support for new naming convention for IottySmartSwitch entity

* Removed commmented code

* Some modifications

* Modified REST EP for iotty CloudApi

* Removed empty entries in manifest.json

* Added test_config_flow

* Fix as requested by @edenhaus

* Added test_init

* Removed comments, added one assert

* Added TEST_CONFIG_FLOW

* Added test for STORE_ENTITY

* Increased code coverage

* Full coverage for api.py

* Added tests for switch component

* Converted INFO logs onto DEBUG logs

* Removed .gitignore from commits

* Modifications to SWITCH.PY

* Initial import 0.0.2

* Fixes to URL, and removed commits

* Added first test for iotty

* First release

* Rebased and resolved conflicts

* Fixed conflicts

* Reviewers request #1
- Removed clutter
- Added support for new naming convention for IottySmartSwitch entity

* Removed commmented code

* Some modifications

* Modified REST EP for iotty CloudApi

* Removed empty entries in manifest.json

* Added test_config_flow

* Some modifications

* Fix as requested by @edenhaus

* Added test_init

* Removed comments, added one assert

* Added TEST_CONFIG_FLOW

* Added test for STORE_ENTITY

* Increased code coverage

* Full coverage for api.py

* Added tests for switch component

* Converted INFO logs onto DEBUG logs

* Removed .gitignore from commits

* Modifications to SWITCH.PY

* Fixed tests for SWITCH

* First working implementation of Coordinator

* Increased code coverage

* Full code coverage

* Missing a line in testing

* Update homeassistant/components/iotty/__init__.py

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

* Update homeassistant/components/iotty/__init__.py

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

* Modified coordinator as per request by edenhaus

* use coordinator entities for switches

* move platforms to constants

* fix whitespace with ruff-format

* correct iotty entry in application_credentials list

* minor style improvements

* refactor function name

* handle new and deleted devices

* improve code for adding devices after first initialization

* use typed config entry instead of adding known devices to hass.data

* improve iotty entity removal

* test listeners update cycle

* handle iotty as devices and not only as entities

* fix test typing for mock config entry

* test with fewer mocks for an integration test style opposed to the previous unit test style

* remove useless tests and add more integration style tests

* check if device_to_remove is None

* integration style tests for turning switches on and off

* remove redundant coordinator tests

* check device status after issuing command in tests

* remove unused fixtures

* add strict typing for iotty

* additional asserts and named snapshots in tests

* fix mypy issues after enabling strict typing

* upgrade iottycloud version to 0.1.3

* move coordinator to runtime_data

* remove entity name

* fix typing issues

* coding style fixes

* improve tests coding style and assertion targets

* test edge cases when apis are not working

* improve tests comments and assertions

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Shapour Nemati <shapour.nemati@iotty.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: shapournemati-iotty <130070037+shapournemati-iotty@users.noreply.github.com>
2024-07-19 12:10:39 +02:00
Brett Adams a2c2488c8b
Add Tesla Fleet integration (#122019)
* Add Tesla Fleet

* Remove debug

* Improvements

* Fix refresh and stage tests

* Working oauth flow test

* Config Flow tests

* Fixes

* fixes

* Remove comment

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

* Remove TYPE_CHECKING

* Add more tests

* More tests

* More tests

* revert teslemetry change

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-07-19 09:05:27 +02:00
Joost Lekkerkerker 2edb7eb42c
Remove Aladdin Connect integration (#120980) 2024-07-02 13:51:44 +02:00
swcloudgenie a670169325
New official genie garage integration (#117020)
* new official genie garage integration

* move api constants into api module

* move scan interval constant to cover.py
2024-05-29 16:13:28 -04:00
Jake Martin 6e024d54f1
Add Monzo integration (#101731)
* Initial monzo implementation

* Tests and fixes

* Extracted api to pypi package

* Add app confirmation step

* Corrected data path for accounts

* Removed useless check

* Improved tests

* Exclude partially tested files from coverage check

* Use has_entity_name naming

* Bumped monzopy to 1.0.10

* Remove commented out code

* Remove reauth from initial PR

* Remove useless code

* Correct comment

* Remove reauth tests

* Remove device triggers from intial PR

* Set attr outside constructor

* Remove f-strings where no longer needed in entity.py

* Rename field to make clearer it's a Callable

* Correct native_unit_of_measurement

* Remove pot transfer service from intial PR

* Remove reauth string

* Remove empty fields in manifest.json

* Freeze SensorEntityDescription and remove Mixin

Also use list comprehensions for producing sensor lists

* Use consts in application_credentials.py

* Revert "Remove useless code"

Apparently this wasn't useless

This reverts commit c6b7109e47202f866c766ea4c16ce3eb0588795b.

* Ruff and pylint style fixes

* Bumped monzopy to 1.1.0

Adds support for joint/business/etc account pots

* Update test snapshot

* Rename AsyncConfigEntryAuth

* Use dataclasses instead of dictionaries

* Move OAuth constants to application_credentials.py

* Remove remaining constants and dependencies for services from this PR

* Remove empty manifest entry

* Fix comment

* Set device entry_type to service

* ACC_SENSORS -> ACCOUNT_SENSORS

* Make value_fn of sensors return StateType

* Rename OAuthMonzoAPI again

* Fix tests

* Patch API instead of integration for unavailable test

* Move pot constant to sensor.py

* Improve type safety in async_get_monzo_api_data()

* Update async_oauth_create_entry() docstring

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-07 20:38:58 +02:00
Marco Lettieri 3a4c6fc7f3
Add microBees integration (#99573)
* Create a new homeassistan integration for microBees

* black --fast homeassistant tests

* Switch platform

* rename folder

* rename folder

* Update owners

* aiohttp removed in favor of hass

* Update config_flow.py

* Update __init__.py

* Update const.py

* Update manifest.json

* Update string.json

* Update servicesMicrobees.py

* Update switch.py

* Update __init__.py

* Update it.json

* Create a new homeassistan integration for microBees

* black --fast homeassistant tests

* Switch platform

* rename folder

* rename folder

* Update owners

* aiohttp removed in favor of hass

* Update config_flow.py

* Update __init__.py

* Update const.py

* Update manifest.json

* Update string.json

* Update servicesMicrobees.py

* Update switch.py

* Update __init__.py

* Update it.json

* fixes review

* fixes review

* fixes review

* pyproject.toml

* Update package_constraints.txt

* fixes review

* bug fixes

* bug fixes

* delete microbees connector

* add other productID in switch

* added coordinator and enanchments

* added coordinator and enanchments

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* add test

* add test

* add test

* add test

* requested commit

* requested commit

* requested commit

* requested commit

* reverting .strict-typing and added microbees to .coveragerc

* remove log

* remove log

* remove log

* remove log

* add test for microbeesExeption and Exeption

* add test for microbeesExeption and Exeption

* add test for microbeesException and Exception

* add test for microbeesException and Exception

* add test for microbeesException and Exception

---------

Co-authored-by: FedDam <noceracity@gmail.com>
Co-authored-by: Federico D'Amico <48856240+FedDam@users.noreply.github.com>
2024-02-19 15:12:03 +01:00
Thomas55555 6d4ab6c758
Add Husqvarna Automower integration (#109073)
* Add Husqvarna Automower

* Update homeassistant/components/husqvarna_automower/__init__.py

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

* Update homeassistant/components/husqvarna_automower/config_flow.py

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

* Update homeassistant/components/husqvarna_automower/entity.py

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

* Update homeassistant/components/husqvarna_automower/entity.py

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

* Update homeassistant/components/husqvarna_automower/lawn_mower.py

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

* Update homeassistant/components/husqvarna_automower/lawn_mower.py

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

* address review

* add test_config_non_unique_profile

* add missing const

* WIP tests

* tests

* tests

* Update homeassistant/components/husqvarna_automower/api.py

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

* Update homeassistant/components/husqvarna_automower/config_flow.py

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

* Update homeassistant/components/husqvarna_automower/config_flow.py

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

* Update tests/components/husqvarna_automower/conftest.py

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

* .

* loop through test

* Update homeassistant/components/husqvarna_automower/entity.py

* Update homeassistant/components/husqvarna_automower/coordinator.py

* Update homeassistant/components/husqvarna_automower/coordinator.py

* Apply suggestions from code review

* ruff

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-02-07 09:27:04 +01:00
Peter Winkler 2508b55b0f
Add myUplink integration (#86522)
* First checkin for myUplink

* Refactored coordinator and sensor state classe

* Updated .coveragerc

* Update test_config_flow

* Fix test_config_flow for myuplink

* Only set state class for temperature sensor

* PR comment updates

* Type strong dict

* use asyncio.timeouts

* PR updates (part 1)

* Updated to myuplink 0.0.9

* Add strict typing

* Fix typing

* Inherit CoordinatorEntity

* Clean up coordinator and sensors

* Use common base entity

* Improve device point sensor

* Exclude entity from coverage

* Set device point entity name if there's no entity description

* Update homeassistant/components/myuplink/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/myuplink/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/myuplink/entity.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remvoed firmware + connstate sensors

* Always add device point parameter name

* Removed MyUplinkDeviceSensor

* Removed unused class

* key="celsius",

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-12 12:17:07 +01:00
Allen Porter 0cb0e3ceeb
Add Google tasks integration, with initial read-only To-do list (#102629)
* Add Google Tasks integration

* Update tests and unique id

* Revert devcontainer change

* Increase test coverage

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove ternary

* Fix JSON

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-10-24 21:30:29 -07:00
Allen Porter bd2fee289d
Update Fitbit integration to allow UI based configuration (#100897)
* Cleanup fitbit sensor API parsing

* Remove API code that is not used yet

* Configuration flow for fitbit

* Code cleanup after manual review

* Streamline code for review

* Use scopes to determine which entities to enable

* Use set for entity comparisons

* Apply fitbit string pr feedback

* Improve fitbit configuration flow error handling

* Apply suggestions from code review

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

* Fix typo in more places

* Revert typing import

* Revert custom domain back to default

* Add additional config flow tests

* Add         breaks_in_ha_version to repair issues

* Update homeassistant/components/fitbit/api.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Increase test coverage for token refresh success case

* Add breaks_in_ha_version for sensor issue

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Simplify translations, issue keys, and token refresh

* Config flow test improvements

* Simplify repair issue creation on fitbit import

* Remove unused strings

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-09-30 16:56:39 -07:00
Joost Lekkerkerker 25a80cd46f
Add config flow to Twitch (#93451)
* Update twitch API

* Update twitchAPI

* Add tests

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Update sensor.py

* Fix coverage

* Move Twitch constants to separate file

* Move Twitch constants to separate file

* Move Twitch constants to separate file

* Add application credentials

* Add config flow

* Try to add tests

* Add strings

* Add tests

* Add tests

* Improve tests

* Fix tests

* Extract Twitch client creation

* Fix reauth

* Remove import flow

* Remove import flow

* Remove reauth

* Update

* Fix Ruff

* Fix feedback

* Add strings

* Add reauth

* Do stuff in init

* Fix stuff

* Fix stuff

* Fix stuff

* Fix stuff

* Fix stuff

* Start with tests

* Test coverage

* Test coverage

* Remove strings

* Cleanup

* Fix feedback

* Fix feedback

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-09-27 15:45:52 +02:00
Michael Arthur 6ef7c5ece6
Add electric kiwi integration (#81149)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-07-25 10:46:53 +02:00
Joost Lekkerkerker e4c51d43f0
Add YouTube integration (#92988)
* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add Youtube stub

* Add Youtube stub

* Add tests

* Add tests

* Add tests

* Clean up

* Add test for options flow

* Fix feedback

* Fix feedback

* Remove obsolete request

* Catch exceptions

* Parallelize latest video calls

* Apply suggestions from code review

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Add youtube to google brands

* Fix feedback

* Fix feedback

* Fix test

* Fix test

* Add unit test for http error

* Update homeassistant/components/youtube/coordinator.py

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Fix black

* Fix feedback

* Fix feedback

* Fix tests

---------

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>
2023-05-27 11:21:12 -07:00
epenet 699cc6c092
Adjust docstring on hassfest generated files (#89080) 2023-03-03 11:34:20 +01:00
Robert Hillis ad65fc27bc
Add Google Mail integration (#82637)
* Add Google Mail integration

* oops

* prettier

* Add email service

* adjustments

* update

* move email to notify

* break out services

* tweaks

* Add CC and BCC support

* drop scope check, breakout tests

* use abstract auth

* tweak

* bump dependency

* dependency bump

* remove oauth2client
2023-01-07 11:59:14 -08:00
tronikos 5d31673465
Google Assistant SDK integration (#82328)
* Copy google_sheets to google_assistant_sdk

This is to improve diff of the next commit with the actual implementation.

Commands used:
cp -r homeassistant/components/google_sheets/ homeassistant/components/google_assistant_sdk/
cp -r tests/components/google_sheets/ tests/components/google_assistant_sdk/

find homeassistant/components/google_assistant_sdk/ tests/components/google_assistant_sdk/ -type f | xargs sed -i \
-e 's@google_sheets@google_assistant_sdk@g' \
-e 's@Google Sheets@Google Assistant SDK@g' \
-e 's@tkdrob@tronikos@g'

* Google Assistant SDK integration
Allows sending commands and broadcast messages to Google Assistant.

* Remove unnecessary async_entry_has_scopes check

* Bump gassist-text to fix protobuf dependency
2022-12-09 07:14:43 -08:00
Aarni Koskela f3e85b6492
Deduplicate blackening (#81802) 2022-11-09 16:58:20 +01:00
Erik Montnemery 1021c90bb8
Use black to format hassfest generated files (#78794) 2022-09-19 17:37:22 -04:00
Robert Hillis a46982befb
Add Google Sheets integration (#77853)
Co-authored-by: Allen Porter <allen@thebends.org>
2022-09-14 14:31:54 -04:00
Franck Nijhof 71cdc1645b
Refactor LaMetric integration (#76759)
* Refactor LaMetric integration

* Use async_setup

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* use async_get_service

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/lametric/conftest.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/components/lametric/conftest.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Pass hassconfig

* Remove try/catch

* Fix passing hassconfig

* Use menu

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-08-18 00:49:11 +02:00
Allen Porter b014d558ff
Add application credentials platform for nest and deprecate yaml for SDM API (#73050)
* Update the nest integration to be useable fully from the config flow

* Support discovery in nest config flow

* Remove configuration entries

* Remove unused import

* Remove dead code

* Update homeassistant/components/nest/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove commented out code

* Use config flow for app auth reauthentication path

* Improves for re-auth for upgrading existing project and creds

* More dead code removal

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Remove outdated code

* Update homeassistant/components/nest/config_flow.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-15 07:15:53 -07:00
Allen Porter f6370d0522
Add Honeywell Lyric application credentials platform and deprecate configuration in yaml (#72335)
Add Honeywell Lyric application credentials platform and deprecate config yaml
2022-05-23 20:16:21 +02:00
Allen Porter dc76cce96b
Add SENZ application credentials platform (#72338) 2022-05-23 14:44:45 +02:00
Allen Porter 39ce25f76d
Add Withings application_credentials platform (#71990)
* Add Withings application_credentials platform

* Update withings auth implementation
2022-05-22 14:30:57 -07:00
Allen Porter c028db00de
Add Neato application credentials platform and deprecate configuration.yaml (#72175) 2022-05-19 21:22:37 -07:00
Allen Porter 7d26be2d4d
Add Home Connect application_credentials platform and deprecate configuration.yaml (#71988)
Add Home Connect application_credentials platform
2022-05-17 10:48:31 +02:00
Matrix e0154d6fb1
Add YoLink product integration (#69167)
* add yolink integration with door sensor

* Add test flow and update .coveragerc

* Yolink integration Bug fix

* resovle test flow

* issues resolve

* issues resolve

* issues resolve

* resolve issues

* issues resolve

* issues resolve

* change .coveragerc and test_flow

* Update yolink api version

* add test for config entry

* change config flow and add test cases

* remove config entry data

* Add token check for re-auth test flow

* fix test flow issues

* Add application credentials

* Add alias for application_credentials

* support application credentials and cloud account linking

* fix suggest change
2022-05-17 09:59:39 +02:00
Allen Porter ddecf76f6f
Add application_credentials platform for netatmo (#71884) 2022-05-16 21:09:48 -07:00
Allen Porter 7c68278482
Add application_credentials platform to geocaching integration (#71880) 2022-05-16 09:57:25 +02:00
Allen Porter 2613c865f7
Add Spotify application_credentials platform (#71871) 2022-05-16 09:31:14 +02:00
Allen Porter 355445db2d
Add application credentials platform for google calendar integration (#71808)
* Add google application_credentials platform

* Further simplify custom auth implementation overrides

* Add test coverage in application_credentials

* Simplify wording in a comment

* Remove unused imports accidentally left from merge

* Wrap lines that are too long for style guide

* Move application credential loading to only where it is needed

* Leave CLIENT_ID and CLIENT_SECRET as required.
2022-05-14 10:27:47 -07:00
Allen Porter 00b5d30e24
Add application credentials platform (#69148)
* Initial developer credentials scaffolding
- Support websocket list/add/delete
- Add developer credentials protocol from yaml config
- Handle OAuth credential registration and de-registration
- Tests for websocket and integration based registration

* Fix pydoc text

* Remove translations and update owners

* Update homeassistant/components/developer_credentials/__init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/developer_credentials/__init__.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Remove _async_get_developer_credential

* Rename to application credentials platform

* Fix race condition and add import support

* Increase code coverage (92%)

* Increase test coverage 93%

* Increase test coverage (94%)

* Increase test coverage (97%)

* Increase test covearge (98%)

* Increase test coverage (99%)

* Increase test coverage (100%)

* Remove http router frozen comment

* Remove auth domain override on import

* Remove debug statement

* Don't import the same client id multiple times

* Add auth dependency for local oauth implementation

* Revert older oauth2 changes from merge

* Update homeassistant/components/application_credentials/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Move config credential import to its own fixture

* Override the mock_application_credentials_integration fixture instead per test

* Update application credentials

* Add dictionary typing

* Use f-strings as per feedback

* Add additional structure needed for an MVP application credential

Add additional structure needed for an MVP, including a target
component Xbox

* Add websocket to list supported integrations for frontend selector

* Application credentials config

* Import xbox credentials

* Remove unnecessary async calls

* Update script/hassfest/application_credentials.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update script/hassfest/application_credentials.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update script/hassfest/application_credentials.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update script/hassfest/application_credentials.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Import credentials with a fixed auth domain

Resolve an issue with compatibility of exisiting config entries when importing
client credentials

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-30 08:06:43 -07:00