Commit Graph

70 Commits (b35fbd8d20312d33a9599ec691ccd359fab0016f)

Author SHA1 Message Date
Maciej Bieniek 09be56964d
AccuWeather tests refactoring (#116923)
* Add mock_accuweather_client

* Improve tests

* Fix exceptions

* Remove unneeded update_listener()

* Fix arguments for fixtures

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-05-06 19:41:48 +02:00
Marc Mueller 5bded2a52d
Fix accuweather system_health after data change (#116063) 2024-04-24 10:30:57 +02:00
Joost Lekkerkerker b328981868
Use snapshot test helper in Accuweather (#115884) 2024-04-20 17:24:40 +02:00
Maciej Bieniek e7076ac83f
Use separate data coordinators for AccuWeather observation and forecast (#115628)
* Remove forecast option

* Update strings

* Use separate DataUpdateCoordinator for observation and forecast

* Fix tests

* Remove unneeded variable

* Separate data coordinator classes

* Use list comprehension

* Separate coordinator clasess to add type annotations

* Test the availability of the forecast sensor entity

* Add DataUpdateCoordinator types

* Use snapshot for test_sensor()

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-04-17 00:00:16 +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 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
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01: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
J. Nick Koston f3a9756f81
Avoid waiting for integration platforms in the parent integration (#112467) 2024-03-05 21:16:42 -10: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
Erik Montnemery 27f7399071
Modernize accuweather weather (#99001) 2023-08-25 16:46:23 +02:00
Joost Lekkerkerker af689d7c3e
Use snapshot assertion for Accuweather diagnostics (#98725) 2023-08-21 09:12:43 +02:00
Maciej Bieniek 12426dfad4
Add entity translations for AccuWeather (#95940)
* Add entity name translations

* Some improvements

* Update tests

* Suggested changes

* day 0 -> today

* night 0 -> tonight

* Fix precipitation
2023-07-29 21:22:53 +02:00
Maciej Bieniek 5249660a6a
Add `uv_index` to AccuWeather weather entity (#97015) 2023-07-22 17:11:39 +02:00
Maciej Bieniek fe9366eee6
Add new properties to the weather entity in Accuweather integration (#95110)
* Add new properties to the current conditions

* Add new properties to forecast

* Use existing constants

* Update tests
2023-06-24 12:38:20 +02:00
Maciej Bieniek 71466e5012
Add new sensors to AccuWeather (#93362)
* Add solar irradiance and condition sensors

* Use entity_registry_enabled_by_default fixture
2023-05-22 21:55:54 +02:00
Maciej Bieniek d47e58fb38
Bump `accuweather` to version 1.0.0 (#93305) 2023-05-21 14:50:10 +02:00
Maciej Bieniek ee23d79a00
Add air quality sensors to Accuweather integration (#91516) 2023-04-22 17:19:21 +02:00
Maciej Bieniek 9d68cdca18
Remove `ozone` state attribute and `ozone` sensors from Accuweather (#91492) 2023-04-16 14:01:22 +02:00
epenet 7b3a932cd9
Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
Maciej Bieniek 8d21e2b168
Use metric units internally in Accuweather integration (#90444)
* Use metric units internally

* Remove unnecessary code

* Simplify sensor classes

* Remove AccuWeatherForecastSensor class

* Update wind speed value in test

* Return suggested_unit_of_measurement for wind entities

* Clean test

* Use _attr_suggested_unit_of_measurement

* Remove _get_suggested_unit()

* Remove unnecessarey code
2023-03-30 13:11:33 +02:00
epenet 8c821c8969
Add JSON support to load_fixture (#88076)
* Add JSON support to load_fixture

* More tests

* Remove lru_cache on load_json
2023-02-16 19:40:47 +01: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
Erik Montnemery bcc1aa03b4
Move sensor rounding to frontend (#87330)
* Move sensor rounding to frontend

* Update integrations

* Add comment
2023-02-04 14:54:36 -05:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
Maciej Bieniek d485630ce9
Use device class ENUM for Accuweather pressure tendency sensor (#86887)
* Use device class ENUM for pressure tendency sensor

* Format
2023-01-30 12:03:23 +01:00
Maciej Bieniek 58bfeb3110
Fix `state_class` for Accuweather `precipitation` sensor (#86088) 2023-01-20 23:36:25 +01:00
Michael 2850583085
Replace the usage of unit constants by enumerations in Tests [a-e] (#85932) 2023-01-15 14:44:01 +01:00
epenet 72fd57a685
Use new device class in accuweather (#83318) 2022-12-06 11:54:59 +01:00
Erik Montnemery 8e617bbc1d
Add `translation_key` property to entites (#82701)
* Add translation_key attribute to entity state

* Update accuweather test

* Index entity translation keys by platform

* Store translation key in entity registry
2022-12-01 09:34:09 +01:00
epenet 6e2803a6d8
Use SchemaOptionsFlowHandler in Accuweather (#82627)
Use SchemaOptionsFlowHandler in accuweather
2022-11-24 20:08:14 +01:00
Maciej Bieniek 052c673c9e
Use `wind_speed` device class instead of `speed` in Accuweather (#81016) 2022-10-26 13:47:29 +02:00
epenet e84e5f134e
Use US_CUSTOMARY_SYSTEM in tests (#80658)
* Use US_CUSTOMARY_SYSTEM in tests

* Don't update test_unit_system
2022-10-20 15:42:23 +02:00
Maciej Bieniek 5abff31437
Use new device classes in Accuweather integration (#79717)
* Add new device classes

* Update tests
2022-10-07 17:52:36 -06:00
epenet c5a56dab42
Apply hass-relative-import to tests (a-c) (#78728) 2022-09-19 09:48:25 +02:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
G Johansson 90e1fb6ce2
Weather unit conversion (#73441)
Co-authored-by: Erik <erik@montnemery.com>
2022-06-23 10:48:30 +02:00
J. Nick Koston f1b400feaf
Revert changes from #70300 part 2 (#70386) 2022-04-21 10:50:00 -10:00
J. Nick Koston 309424d3b9
Prevent tests changing units from affecting other tests (#70300)
* Prevent tests changing temperature_unit from affecting other tests

* tweak
2022-04-19 11:38:52 -10:00
epenet 053c4428a9
Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Maciej Bieniek 24212ab598
Add diagnostics platform for AccuWeather integration (#68752) 2022-03-28 08:42:25 -07:00
Maciej Bieniek 32be5576dc
Get wind speed unit from AccuWeather data (#65425) 2022-02-02 17:07:12 -08:00
Josh Soref ace5918208
spelling: components/accuweather (#64264)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-01-17 15:19:24 +01:00
Dave T fe08668a87
Use DeviceClass Enums in accuweather tests (#61990) 2021-12-16 21:05:56 +01:00
Ville Skyttä 5bf67cac66
Use RegistryEntryDisabler (#60436) 2021-12-15 23:25:40 +02:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00