Commit Graph

27 Commits

Author SHA1 Message Date
wittypluck
9ed6b591a5 Fix CO concentration unit in OpenWeatherMap (#146403) 2025-06-09 19:55:09 +02:00
wittypluck
b17d62177c Add Air Pollution support to OpenWeatherMap (#137949)
Co-authored-by: Joostlek <joostlek@outlook.com>
2025-05-26 21:34:48 +02:00
Abílio Costa
b626204f63 Add default device class display precision for Sensor (#145013)
* Add default device class display precision for Sensor

* Renaming, docstrings, cleanup

* Simplify units list

* Fix tests

* Fix missing precision when suggested is specified

* Update snapshots

* Fix when unit of measurement is not valid

* Fix tests

* Fix deprecated unit usage

* Fix goalzero tests

The sensor native_value method was accessing the data dict and trowing,
since the mock did not have any data for the sensors.

Since now the precision is always specified (it was missing for those
sensors), the throw was hitting async_update_entity_options in _update_suggested_precision.
Previously, async_update_entity_options was not called since it had no
precision.

* Fix metoffice

* Fix smartthings

* Add default sensor data for Tesla Wall Connector tests

* Update snapshots

* Revert spaces

* Update smartthings snapshots

* Add missing sensor mock for tesla wall connector

* Address review comments

* Add doc comment

* Add cap to doc comment

* Update comment

* Update snapshots

* Update comment
2025-05-26 19:40:29 +02:00
Erik Montnemery
4e1d5fbeb0 Add WS command to help reset custom entity_id (#145504)
* Add WS command to help reset custom entity_id

* Calculate suggested object id from entity properties

* Fix logic and add additional tests

* Adjust test

* Update folder_watcher test

* Handle current entity id matches the automatic entity id

* Don't store calculated_object_id

* Update snapshots

* Update snapshots

* Update test

* Tweak logic for reusing current entity_id

* Improve test

* Don't assign same entity_id to several entities

* Prioritize custom entity name

* Update snapshots

* Update snapshots
2025-05-26 19:28:27 +02:00
Simone Chemelli
484a547758 Fix pylance warning on SnapshotAssertion import (#145206) 2025-05-19 13:55:48 +02:00
wittypluck
e29fc37bb1 Use device and entity name for OpenWeather map entities (#144513)
* Use entity name

* Update snapshot with expected chnages
2025-05-09 18:47:18 +02:00
wittypluck
6350ed3415 Add snapshot tests for OpenWeatherMap sensors (#139657)
* Add snapshot tests for sensors

* Code cleanup

* Patch during async_setup only

* Use snapshot_platform, split platforms for snapshot tests

* Make mock_config_entry and mode fixtures

* Update snapshots with  latest device and state class changes

* Move setup_platform to __init__.py and patch HA object instead of library

* Remove if statements in tests

* Add client mock fixture to patch get_weather instead of internal call

* Code cleanup

* Test explicit list of modes

* Fix

* Fix

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
2025-05-09 13:06:38 +02:00
wittypluck
4a7fd89abd Bump pyopenweathermap to 0.2.2 and remove deprecated API version v2.5 (#139599)
* Bump pyopenweathermap

* Remove deprecated API mode v2.5
2025-03-02 02:32:55 +01:00
Andrew
1fb51ef189 Add OpenWeatherMap Minute forecast action (#128799) 2025-02-25 15:54:10 +01:00
Andrew
25f66e6ac0 Bump pyopenweathermap to v0.2.1 (#128892) 2024-10-21 16:20:39 +02:00
Evgeny
4f8a6979d9 Bump OpenWeatherMap to 0.1.1 (#120178)
* add owm modes

* fix tests

* fix modes

* remove sensors

* Update homeassistant/components/openweathermap/sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-10 17:01:26 +02:00
Evgeny
24d31924a0 Migrate OpenWeaterMap to new library (support API 3.0) (#116870)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-23 21:51:10 -10:00
epenet
9204ccfa17 Use is in ConfigEntryState enum comparison in tests (N-Z) (#114926) 2024-04-05 17:37:00 +02:00
Joost Lekkerkerker
5d500cb74b Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
Marc Mueller
1722e23df8 Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Joost Lekkerkerker
a82410d5e9 Deduplicate constants E-Z (#105657) 2023-12-13 17:05:37 +01:00
epenet
7b3a932cd9 Remove incorrect constant usage in test (#91198) 2023-04-11 10:00:17 +02:00
epenet
3abf7ea18a Add type hints to integration tests (m-p) (#87705) 2023-02-08 07:48:54 -08:00
Jan Bouwhuis
9c192dea9c Allow OpenWeatherMap config flow to test using old API to pass (#78074)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-08 16:49:49 -04:00
Franck Nijhof
7cd68381f1 Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Fabian Zimmermann
3c0a24db50 Convert openweathermap dewpoint from kelvin to celcius (#51893)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-28 11:35:33 +02:00
Ville Skyttä
19d25cd901 Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Niccolo Zapponi
5ddf99e496 Add support for OpenWeatherMap One Call API (#39839) 2020-11-03 08:37:30 -10:00
Paulus Schoutsen
e303064f75 Don't use asynctest directly (#41306) 2020-10-06 10:15:50 +02:00
Jenny
8b30b6b312 Use reference strings for openweathermap (#41055) 2020-10-03 14:11:03 +02:00
Evgeny
b0192cf9c0 Add OpenWeatherMap config_flow (#34659)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-04 18:22:50 -05:00