Commit Graph

34 Commits (a9381d259040d4a02881cc9e203bc8e3946b2146)

Author SHA1 Message Date
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 868a5f377f
Ruff: isort don't split imports based on trailing comma (#98162) 2023-08-10 14:27:03 +02:00
G Johansson 15eed166ec
Modernize SMHI weather (#97275)
* SMHI forecast service

* Mod weather

* reset weather

* Fix tests

* coverage

* add test
2023-08-07 17:24:43 +02:00
G Johansson 071679f91f
Use new attributes in Smhi (#95096) 2023-06-23 11:32:20 +02:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
Franck Nijhof 79b52a2b41
Stricter pylint message control (#86154) 2023-01-20 13:47:55 +01:00
Michael 9709391b52
Replace the usage of unit constants by enumerations in Tests [s-u] (#85937) 2023-01-16 09:00:27 +01:00
G Johansson 97dcfe4445
Smhi reverse change of unique id change (#74176) 2022-06-29 17:13:07 +02:00
G Johansson c4ff317ec6
Smhi minor fixes (#72606)
* Initial commit

* Tests

* From review comments
2022-06-28 14:29:00 +02:00
G Johansson 2f0fe0df82
Fix wind speed SMHI (#72999) 2022-06-28 01:50:06 +02:00
G Johansson 3cfa2bb6fe
Cleanup code config flow smhi (#64197) 2022-01-16 15:32:16 -10:00
G Johansson 6750614655
Set unique id for config entry in smhi (#63547) 2022-01-15 09:01:48 -10:00
Franck Nijhof 13db867c1d
Move attribution attribute to Entity base class (#57492) 2021-10-11 23:15:32 +02:00
Erik Montnemery 80a57f5118
Prevent 3rd party lib from opening sockets in smhi tests (#56335) 2021-09-19 10:18:45 +02:00
Martin Hjelmare dab66a58ce
Clean smhi tests (#50681) 2021-05-15 20:22:32 +02:00
Christer Vestermark fca56993c6
Add smhi wind gust speed and thunder probability (#50328)
* Added some extra attributes

Added the extra attributes
wind_gust_speed and
thunder_probability
that were already implemented in the underlaying library (joysoftware
/
pypi_smhi).

Also for the existing extra attribute cloudiness, it is added if "is not None" instead of just "if self.cloudiness" which would make it False (and therefore not available) if cloudiness = 0.

* Trying to solve the style issues

Removed white spaces and changed order of list as suggested by the tests.

* New try to solve the style issues

Removed some more white spaces...

* Changed dictionary handling as suggested

Changed dictionary handling as suggested by MartinHjelmare.

* Updated test

Updated test_weather.py to include the new attributes wind_gust_speed and thunder_probability.

* Added missing imports

Added the missing imports
ATTR_SMHI_THUNDER_PROBABILITY,
ATTR_SMHI_WIND_GUST_SPEED,

* Renaming self.thunder to self.thunder_probability and correcting test valuesfor

Renamed the new internal attribute
thunder to thunder_probability, same as the exposed attribute for improved consistency.
Corrected test values according to smhi.json.

* Forgot to change to self.thunder_probability in one place.

sorry.
2021-05-10 16:44:08 +02:00
J. Nick Koston 87420627a8
Reduce config entry setup/unload boilerplate Q-S (#49778) 2021-04-27 22:10:04 +02:00
Franck Nijhof af80ca6795
Clean up superfluous integration setup - part 5 (#49296) 2021-04-16 09:22:56 -07:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen 276f3afb00
Do async_setup_platform in background (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Paulus Schoutsen 0d700f6a63
Fix tests for Python 3.8 (#34672) 2020-04-25 14:32:55 -07:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Ville Skyttä 5216477353
Be consistent with Home Assistant and Hass.io spelling (#30500)
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Bas Nijholt 23b92b2a56 Sort imports according to PEP8 for components starting with "S" (#29777) 2019-12-09 14:38:01 +01:00
Ville Skyttä 99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Franck Nijhof 9c9c921922 Use Python3 new super syntax sugar (#26890) 2019-09-24 15:38:20 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Tomas Hellström 208ea6eae4 SMHI component: Bugfix - calc precipitation (#20745)
* Bugfix - calc precipitation

* Feedback: better way to skip first forecast

* Even less messy way

* lint error
2019-02-05 07:43:04 -05:00
Paulus Schoutsen ec57db78b5
Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00
Tomas Hellström 540d22d603 Swedish weather institute weather component (#16717)
* SMHI Component

* Clean up typos

* Fixed default values first config to home location (tests will follow)

* Fixed tests and removed unused function

* Minor fixup after comments from @kane610

* add support for precipitation in forecast

* Removed old async_step_init not needed.
2018-10-08 23:54:55 +02:00