Commit Graph

42 Commits (b3f7f379df235bcd7ebdd2b039932c98e2dff937)

Author SHA1 Message Date
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
epenet 99b349fa2c
Fix consider-using-dict-items warnings in tests (#119497) 2024-06-12 16:44:29 +02:00
epenet c896458fcf
Fix namespace-import pylint warning in components (#119299) 2024-06-10 15:55:08 +02:00
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
J. Nick Koston 9a79320861
Mark executor jobs as background unless created from a tracked task (#114450)
* Mark executor jobs as background unless created from a tracked task

If the current task is not tracked the executor job should not
be a background task to avoid delaying startup and shutdown.

Currently any executor job created in a untracked task or
background task would end up being tracked and delaying
startup/shutdown

* import exec has the same issue

* Avoid tracking import executor jobs

There is no reason to track these jobs as they are always awaited
and we do not want to support fire and forget import executor jobs

* fix xiaomi_miio

* lots of fire time changed without background await

* revert changes moved to other PR

* more

* more

* more

* m

* m

* p

* fix fire and forget tests

* scrape

* sonos

* system

* more

* capture callback before block

* coverage

* more

* more races

* more races

* more

* missed some

* more fixes

* missed some more

* fix

* remove unneeded

* one more race

* two
2024-03-30 00:16:53 -04:00
G Johansson 65230908c6
Remove deprecated forecast attribute from WeatherEntity (#110761)
* Remove deprecated forecast attribute from WeatherEntity

* Fix some

* Ruff

* ipma

* buienradar

* some more

* Some more

* More and more

* strings

* attr_forecast

* Fix nws

* Fix

* remove from coverage

* Remove recorder test

* Review comments
2024-03-27 16:51:29 +01:00
G Johansson b190cdceaf
Remove hourly weather entity from metoffice (#112452) 2024-03-27 11:06:31 +01:00
Joost Lekkerkerker 812bd4af65
Move metoffice fixture to integration test (#112992)
* Move metoffice fixture to integration test

* Fix

* Update tests/components/metoffice/test_config_flow.py

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

* Fix

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-03-10 23:27:00 -04:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
DustyArmstrong 3bf6d525fb
Bump datapoint to 0.9.9 + re-enable Met Office Integration (#110206) 2024-02-13 17:24:08 +01:00
Franck Nijhof 3eb1283fa5
Disable Python 3.12 incompatible integrations (#108163) 2024-01-17 14:47:03 +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
Jan-Philipp Benecke 9326ea09a5
Update m* tests to use entity & device registry fixtures (#103980) 2023-11-15 10:33:11 +01:00
Jan Bouwhuis 624837912c
Fix metoffice test_forecast_subscription raises key error (#103598)
Allow test time change to be processed
2023-11-07 22:11:02 +01:00
Marc Mueller ba91aaa28d
Add support for Python 3.12 (#101651) 2023-10-10 21:34:49 +02:00
Erik Montnemery ecdb0bb46a
Modernize metoffice weather (#99050)
* Modernize metoffice weather

* Exclude sensors from additional test
2023-10-10 16:49:36 +02:00
Marc Mueller fe0fe19be9
Use datetime.UTC alias [3.11] (#97067) 2023-07-22 17:05:11 -05:00
J. Nick Koston 99b58f157e
Bump PyJWT to 2.6.0 (#90134)
* Bump PyJWT to 2.6.0

* fix time being frozen too late which makes the access token creation time in the future

* revert zha change

* fix repairs test

* fix ical test
2023-03-22 20:00:47 -04:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 6c430e03bc
Add type hints to integration tests (part 14) (#88005) 2023-02-15 10:31:43 +01:00
Franck Nijhof 62dcbe5258
Enable Ruff PT001 (#86730) 2023-01-26 18:05:05 +01:00
avee87 8c0e3b9d50
Migrate MetOffice to new entity naming style (#74978)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-09-28 16:37:35 +02:00
avee87 98052646f2
Remove visibility from metoffice weather (#74314)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-07-02 13:42:58 -07:00
avee87 08c2bd82bd
Migrate metoffice to native_* (#74312) 2022-07-02 13:27:47 -07:00
Gordon Allott 66b02ecff0
Ensure metoffice daily are returned once daily (#72440)
* ensure metoffice daily are returned once daily

* Fixes metoffice tests for MODE_DAILY
2022-06-20 20:27:39 +02:00
J. Nick Koston fe6a4bfb1d
Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC (#69643)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-09 09:05:54 -10:00
Martin Hjelmare c9bb688a79
Revert metoffice weather daytime (#60978) 2021-12-04 10:29:48 +01:00
avee87 d0da0eef36
Add day/night markers to MetOffice daily forecast (#58679) 2021-12-01 21:42:59 -05:00
avee87 d066864158
Use precipitation probability in MetOffice forecasts (#58677) 2021-12-01 21:41:28 -05:00
avee87 9088a6a138
Add device registry entry for MetOffice (#58683) 2021-11-23 22:45:23 +01:00
avee87 6a80559fa8
Use separate weather condition for clear night in MetOffice forecasts (#55135) 2021-10-17 00:57:47 +02:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
avee87 5ff7c7708d
Use iso-formatted times in MetOffice weather forecast (#52672)
* Fixed raw datetime in MetOffice weather forecast

* Use datetime in sensor attribute
2021-07-08 10:01:06 +02:00
avee87 2d1744c573
Add forecasts to MetOffice integration (#50876)
* MetOfficeData now retrieves both 3-hourly and daily data (full forecast data, as well as "now" snapshot) on each update

* Bump datapoint API up to latest version

* Create 2 sets of sensors - one of each set for 3-hourly and for daily data (same ones initially enabled, for now)

* Create two entities (one each for 3-hourly and daily data) and also add in the forecast data for each dataset

* Testing changes to accommodate now having two sets of everything for 3-hourly and daily update data

* Removed unused import (reported by flake8)

* As per conversation with @MatthewFlamm leave the 3-hourly entity's unique_id unchanged (although the display name is changed)

* Make some improvements based on reviews

Make some improvements and fix up the formatting/linting failures.

* Make some improvements based on reviews

Make some improvements and fix up the formatting/linting failures.

* Added more test coverage

* import asyncio

* Try to fix test

* Rewrote everything using CoordinatorEntity

* Fixed config flow

* Fixed lint errors

Co-authored-by: MrHarcombe <ian.harcombe@gmail.com>
Co-authored-by: Henco Appel <hencoappel+github@gmail.com>
2021-06-27 15:04:42 -04:00
Franck Nijhof 7264c95217
Clean up superfluous integration setup - part 6 (#49298) 2021-04-16 09:23:27 -07:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 1c36bf5e19
Fix block till done in create entry config flow tests (#42290) 2020-10-24 16:20:56 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston 42227c1c53
Improve the performance of dt_util.utcnow() (#39145) 2020-08-23 09:57:58 +02:00
J. Nick Koston 89a9634d35
Use eventloop for scheduling (#37184)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-29 09:39:24 -07:00
Ian Harcombe c96458c7e4
Convert MetOffice to use UI for configuration (#34900)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-15 12:02:25 +02:00