Commit Graph

28 Commits (85fdc562400211bbaab07233bd5e9a7c496ddb44)

Author SHA1 Message Date
Maciej Bieniek 74e9c050af
Add `diagnostics` platform for Airly integration (#69874)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2022-04-13 19:22:37 +02:00
epenet 053c4428a9
Prettify json (component test fixtures) (#68892) 2022-03-30 11:37:17 +02:00
Josh Soref eda806ca12
spelling: components/airly (#64266)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-01-17 19:22:11 -08:00
Dave T 4f7182a41a
Use DeviceClass Enums in airly tests (#61989) 2021-12-16 20:59:25 +01:00
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Ville Skyttä a598d9f353
Use HTTPStatus instead of HTTP_ consts and magic values in components/a* (#57988) 2021-10-22 14:21:34 +02:00
Maciej Bieniek bd550c4559
Use AQI, PM1, PM25, PM10 device classes in Airly (#54742) 2021-08-18 02:40:06 +02:00
Maciej Bieniek 3d556f14a5
Remove `air_quality` platform from Airly integration (#52225)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-28 10:15:56 +02:00
Maciej Bieniek c9178e58b5
Add support for state class for Airly sensor (#51285) 2021-05-31 16:00:58 +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
Ville Skyttä b89c53f759
Type hint device registry identifiers as set of str 2-tuples (#50355)
* Type hint device registry identifiers as set of str 2-tuples

* Fix airly test

* Really fix airly test, add another migration test
2021-05-10 12:13:45 +02:00
Maciej Bieniek 6df0190aeb
Improve type annotations for Airly integration (#49898) 2021-05-07 09:47:52 -05:00
Maciej Bieniek 513685bbea
Add dynamic update interval to Airly integration (#47505)
* Add dynamic update interval

* Update tests

* Improve tests

* Improve comments

* Add MAX_UPDATE_INTERVAL

* Suggested change

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Use async_fire_time_changed to test update interval

* Fix test_update_interval

* Patch dt_util in airly integration

* Cleaning

* Use total_seconds instead of seconds

* Fix update interval test

* Refactor update interval test

* Don't create new context manager

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-27 23:34:53 +02:00
Erik Montnemery 78b21b1ad1
Update tests a-b to use async_get() instead of async_get_registry() (#47651) 2021-03-09 14:24:34 +01:00
Maciej Bieniek 66027bcef5
Bump airly library to version 1.1.0 (#47163) 2021-02-28 12:53:13 +01:00
Maciej Bieniek 2e50c1be8e
Add nearest method to get data for Airly integration (#44288)
* Add nearest method

* Add tests

* Move urls to consts

* Simplify config flow

* Fix tests

* Update tests

* Use in instead get

* Fix AirlyError message in tests

* Fix manual update entity tests

* Clean up tests

* Fix after rebase

* Increase test coverage

* Format the code

* Fix after rebase
2021-01-04 23:14:45 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Maciej Bieniek 97894bd718
Refactor Airly config flow (#44330) 2020-12-17 19:34:40 +01:00
Maciej Bieniek 94e1f8e631
Refactor Airly tests (#44315) 2020-12-17 16:44:46 +01:00
Maciej Bieniek 86043b2957
Add support for system health to Airly integrarion (#43220) 2020-12-02 19:32:42 +01:00
SNoof85 3195ce5d56
Use of reference strings for Airly config flow (#40946) 2020-10-01 12:28:32 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Maciej Bieniek ad0560ef37
Improve tests for Airly integration (#38357)
* Add tests

* More tests

* Add PARALLEL_UPDATES

* Change Quality scale to platinum

* Change PARALLEL_UPDATES value
2020-07-30 08:41:18 -10:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
springstan bc26be3c11
Add and use HTTP_FORBIDDEN constant (#33839) 2020-04-09 17:41:17 +02:00
Maciej Bieniek 15645ab0c9 Add unique ID to Airly config entries (#30681)
* Add unique ID to Airly config entries

* Update tests

* Update tests

* Fix typo

* Remove unnecesary and undo changes in first test

* Suggested change
2020-01-13 13:28:07 +01:00
Bas Nijholt 700cecc8ef sort imports according to PEP8 for airly (#29615) 2019-12-08 13:41:51 +01:00
Maciej Bieniek 8ba4ee1012 Add Airly integration (#26375)
* Add Airly integration

* Update .coveragerc file

* Remove AVAILABLE_CONDITIONS and fix device_class

* Don't create client on every update

* Rename client to session

* Rename state_attributes to device_state_attributes

* Remove log latitude and longitude

* Fix try...except

* Change latitude and longitude to HA defaults

* _show_config_form doesn't need coroutine

* Simplify config_flow errors handlig

* Preetier

* Remove unnecessary condition

* Change sensor platform to air_quality

* Remove PM1

* Make unique_id more unique

* Remove ,

* Add tests for config_flow

* Move conf to CONFIG

* Remove domain from unique_id

* Change the way update of attrs

* Language and attrs

* Fix attrs

* Add aiohttp error handling

* Throttle as decorator

* Suggested change

* Suggested change

* Invert condition

* Cleaning

* Add tests

* Polish no sesnor error handling

* Better strings

* Fix test_invalid_api_key

* Fix documentation url

* Remove unnecessary test

* Remove language option

* Fix test_invalid_api_key once again

* Sort imports

* Remove splits in strings
2019-10-04 13:58:29 +02:00