Commit Graph

5 Commits (b80f7185b2e8e3a04727a59032a517cb87c9ce19)

Author SHA1 Message Date
epenet b81f0b600f
Move current_request_with_host fixture to decorator (#118810)
* Move current_request_with_host fixture to decorator

* One more
2024-06-04 17:50:22 +02:00
Jake Martin a3b60cb054
Add Monzo config reauth (#117726)
* Add reauth config flow

* Trigger reauth on Monzo AuthorisaionExpiredError

* Add missing abort strings

* Use FlowResultType enum

* One extra == swapped for is

* Use helper in reauth

* Patch correct function in reauth test

* Remove unecessary **

* Swap patch and calls check for access token checks

* Do reauth trigger test without patch

* Remove unnecessary str() on user_id - always str anyway

* Update tests/components/monzo/test_config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-06-03 13:18:15 +02:00
Joost Lekkerkerker b39028acf2
Improve Monzo tests (#117036) 2024-05-18 13:20:08 +02:00
Joost Lekkerkerker 27d45f04c4
Fix capitalization in Monzo strings (#117035)
* Fix capitalization in Monzo strings

* Fix capitalization in Monzo strings

* Fix capitalization in Monzo strings
2024-05-07 22:33:10 +02: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