Commit Graph

57 Commits (8020bec47bff5c6e5f08eb1e4dafaeaa85238bd9)

Author SHA1 Message Date
Álvaro Fernández Rojas 5ef12c3993
Add AEMET Weather Radar images (#131386)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-12-23 15:51:21 +01:00
Álvaro Fernández Rojas 5c2d769b54
Enable AEMET data cache (#131226) 2024-12-21 11:30:46 +01:00
Erik Montnemery ecb3bf79f3
Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115.
2024-12-18 13:51:05 +01:00
Erik Montnemery ad15786115
Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01:00
Erik Montnemery d82bff1bc2
Index config entry discovery_keys by discovery domain (#126563)
* Index config entry discovery_keys by discovery domain

* Add new signal

* Update tests

* Update homeassistant/config_entries.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fix imports

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 21:48:11 +02:00
Erik Montnemery b2982c18bb
Reinitialize zeroconf discovery flow on unignore (#125753)
* Reinitialize zeroconf discovery flow on unignore

* Adjust tests

* Improve comments

* Fix logic for updating discovery keys

* Add tests

* Use mock_config_flow helper in new config_entries test

* Add discovery_keys attribute to ConfigEntry

* Update zeroconf rediscovery

* Change type of ConfigEntry.discovery_keys

* Update tests

* Fix DiscoveryKey.from_json_dict and add tests

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
Joost Lekkerkerker e8d7eb05ae
Delete unused snapshots (#123656)
* Delete unused snapshots

* Delete unused snapshots
2024-08-12 13:28:09 +02:00
Robert Resch ad50136dbd
Add created_at/modified_at to config entries (#122456) 2024-07-29 22:08:46 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
Luca Angemi fdade67211
Add device info for Aemet (#120243)
* Update sensor.py

* Update weather.py

* Update sensor.py

* ruff

* add device info to entity

* remove info from sensor

* remove info from weather

* ruff

* amend entity

* Update sensor.py

* Update weather.py

* ruff again

* add DOMAIN

* type unique_id

* Update entity.py

* Update entity.py

* assert

* update tests

* change snapshot
2024-06-24 08:20:34 +02:00
G Johansson b6b6248713
Remove legacy get forecast service from Weather (#118664)
* Remove legacy get forecast service from Weather

* Fix tests

* Fix test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-06-17 21:13:28 +02:00
Marc Mueller 279483ddb0
Import Generator from typing_extensions (2) (#118989) 2024-06-06 17:24:22 +02:00
Marc Mueller 905adb2431
Update codespell ignore list (#118018) 2024-05-24 10:24:34 +02:00
Thomas55555 528d67ee06
Remove unused snapshots [a-f] (#117999) 2024-05-24 08:28:04 +02:00
J. Nick Koston 5a609c34bb
Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
epenet 010ed8da9c
Use ConfigEntry runtime_data in aemet (#117411) 2024-05-14 10:59:55 +02:00
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost Lekkerkerker 9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
G Johansson 4fb11dc4f3
Remove hourly weather entity from Aemet (#110764) 2024-03-22 16:31:43 +01:00
J. Nick Koston 65358c129a
Replace periodic tasks with background tasks (#112726)
* Phase out periodic tasks

* false by default or some tests will block forever, will need to fix each one manually

* kwarg works

* kwarg works

* kwarg works

* fixes

* fix more tests

* fix more tests

* fix lifx

* opensky

* pvpc_hourly_pricing

* adjust more

* adjust more

* smarttub

* adjust more

* adjust more

* adjust more

* adjust more

* adjust

* no eager executor

* zha

* qnap_qsw

* fix more

* fix fix

* docs

* its a wrapper now

* add more coverage

* coverage

* cover all combos

* more fixes

* more fixes

* more fixes

* remaining issues are legit bugs in tests

* make tplink test more predictable

* more fixes

* feedreader

* grind out some more

* make test race safe

* one more
2024-03-08 21:45:10 -05:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Álvaro Fernández Rojas b3e10198dd
Enable CONF_STATION_UPDATES by default on AEMET (#111214)
* aemet: set CONF_STATION_UPDATES default to True

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* tests: aemet: check CONF_STATION_UPDATES default form value

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Revert "tests: aemet: check CONF_STATION_UPDATES default form value"

This reverts commit f0f95da68f.

* tests: aemet: parametriz test_form_options

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-25 23:23:18 +02:00
Jan-Philipp Benecke 076ae22fdd
Freeze time in aemet diagnostics test (#111308) 2024-02-24 16:26:16 -05:00
Álvaro Fernández Rojas 57d169582d
Add diagnostics support for AEMET (#111218)
aemet: add diagnostics support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-24 20:08:50 +01:00
Álvaro Fernández Rojas b72d64a3dc
Disable AEMET legacy options (#107795)
* aemet: disable legacy options

This enables proper timezone handling:
- Atlantic/Canary for the Canary Islands.
- Europe/Madrid for the Iberian Peninsula.

Also provides daily data for the current day after AEMET stops providing the
full day interval, which is normally after midday (12:00).
This is a breaking change because with the previous behaviour the daily data
for the current day wasn't available after midday and now it will be.
What the integration library does to workaround this is to fallback to the
12-24 interval data if the the 00-24 is no longer provided by the API.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* Fix AEMET tests with v0.4.8

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-02-22 12:52:57 +01:00
Álvaro Fernández Rojas 9036d67588
Rename AEMET weather_update_coordinator (#107740)
* aemet: rename weather_update_coordinator

Use "coordinator" instead, like other integrations.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* coverage: remove AEMET coordinator

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-10 20:33:44 +01:00
Álvaro Fernández Rojas 6a6c447c28
Use new AEMET library data for sensor platform (#102972)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-10 16:36:20 +01:00
Kevin Stillhammer 173f4760bc
Deprecate weather.get_forecast (#102534)
* Deprecate weather.get_forecast

* Rename forecast to get_forecasts

* raise issue for use of deprecated service

* Add fix_flow

* Add service translation/yaml
2023-11-19 20:44:02 +01:00
Franck Nijhof 04e0e2bd75
Update a* tests to use device & entity registry fixtures (#103711) 2023-11-09 20:46:20 +01:00
Álvaro Fernández Rojas cb0517d20e
Update AEMET-OpenData to v0.4.6 (#102996) 2023-10-30 18:54:50 +01:00
Álvaro Fernández Rojas fb5d058885
Add AEMET library data to coordinator and use it for weather platform (#102954) 2023-10-28 13:53:40 -05:00
Álvaro Fernández Rojas 7ec2496c81
Handle timeouts on AEMET init (#102289)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-10-19 10:42:31 +02:00
Álvaro Fernández Rojas da13afbd3c
Add missing AEMET wind gust speed (#100157) 2023-09-12 09:08:06 +02:00
Álvaro Fernández Rojas 9c65e59cc8
Remove AEMET daily precipitation sensor test (#100118) 2023-09-11 09:46:59 -05:00
Álvaro Fernández Rojas 4508e341c9
Add wind gust to AEMET hourly forecasts (#99289)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-08-29 21:14:37 +02:00
Álvaro Fernández Rojas 2e0a22fdaf
Use freezegun in AEMET tests (#99253) 2023-08-29 09:33:12 -05:00
Álvaro Fernández Rojas fae82731e1
Simplify and improve AEMET coordinator updates (#99273) 2023-08-29 08:43:14 -05:00
Álvaro Fernández Rojas 30628766ae
Update AEMET-OpenData to v0.3.0 (#98810) 2023-08-22 23:21:42 +02:00
Erik Montnemery caeb20f9c9
Modernize aemet weather (#97969)
* Modernize aemet weather

* Improve test coverage

* Only create a single entity for new config entries
2023-08-15 20:55:16 +02:00
epenet 7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet 3e2ee7cd11
Add missing mock in aemet config flow tests (#89360) 2023-03-08 10:18:44 -05:00
epenet 2545694d41
Add type hints to integration tests (a) (#87684)
* Add type hints to accuweather tests

* Adjust a** components

* Adjust aiohttp_client

* ClientSessionGenerator/WebSocketGenerator
2023-02-08 12:16:23 +01:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Erik Montnemery a7158fee67
Revert "Migrate aemet to native_*" (#74471) 2022-07-05 22:24:08 +02:00
Erik Montnemery 0768ed453d
Migrate aemet to native_* (#74037) 2022-07-04 14:06:32 +02:00
G Johansson 90e1fb6ce2
Weather unit conversion (#73441)
Co-authored-by: Erik <erik@montnemery.com>
2022-06-23 10:48:30 +02:00
Álvaro Fernández Rojas 9a5e0281db
Add missing AEMET weather units (#70165) 2022-05-08 18:20:18 -05:00
epenet 053c4428a9
Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Erik Montnemery cf4033b1bc
Simplify time zone setting in tests (#68330)
* Simplify timezone setting in tests

* Fix typo

* Adjust caldav tests

* Adjust input_datetime tests

* Adjust time_date tests

* Adjust tod tests

* Adjust helper tests

* Adjust recorder tests

* Adjust risco tests

* Adjust aemet tests

* Adjust flux tests

* Adjust forecast_solar tests

* Revert unnecessary change in forecast_solar test

* Adjust climacell tests

* Adjust google tests

* Adjust sensor tests

* Adjust sonarr tests

* Adjust template tests

* Adjust zodiac tests

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-20 10:25:15 +01:00