Commit Graph

18 Commits (b56f54745a9134ff3447eb57ad96ed51884bb9f9)

Author SHA1 Message Date
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03: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
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
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
Ville Skyttä 153d6e891e
Use config_entries.SOURCE_* constants (#49631) 2021-04-25 11:27:40 +02:00
Erik Montnemery 87e7cebd36
Update tests c-h to use registry async_get (#47652) 2021-03-09 14:31:17 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Erik Montnemery ebcee2eb35
Fix geonetnz_quakes test flapping (#37473) 2020-07-04 17:42:28 +02:00
J. Nick Koston 3eb6a68d12
Ensure async_setup is mocked in geonetnz intergration tests (#37426)
* Ensure async_setup is mocked in geonetnz intergration tests

* s/asynctest/tests.async_mock/g
2020-07-03 11:14:19 -07: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
springstan 328cadbaa2
Use LENGTH_KILOMETERS constant (#33976)
* Use LENGTH_KILOMETERS constant

* Fix tests by importing the constant directly
2020-04-11 02:12:39 +02:00
Paulus Schoutsen 2abdfc9da6
GeoNet NZ Quakes code improvements (#32338)
* code quality improvements

* code quality improvements and fixed tests

* explicitly set unique ids

* improve unique id creation

* remove entities from entity registry

* added test for removing entities from entity registry

* revert entity registry handling from sensor and test code

* check for entity registry removal in geolocation test case

* make import absolute; isort

* change quality scale
2020-03-04 14:52:16 -08:00
Bas Nijholt 425a1814d9 Sort imports according to PEP8 for geonetnz_quakes (#29668) 2019-12-09 11:28:07 +01:00
Malte Franken 13bb2ea35a GeoNet NZ Quakes Sensor (#26078)
* working version of status sensor

* changed unit of measurement

* align naming with feed source

* simplified sensor name

* fix potential issue during initialisation

* fixed tests

* changed icon to constant

* added tests for new sensor

* split tests for geolocation vs sensor

* fixed lint

* fixed pylint

* fixed test

* removed config entry id from attributes

* moved entity manager to component

* fix issue with multiple config entries overriding each other's data

* creating async tasks instead of awaiting each unloading

* moved manager to component

* correctly triggering update only when this component is loaded

* fixed tests after major code refactorings

* fixed pylint

* moved actual creation of new events to geolocation platform

* changed all timestamps to utc

* changed the way platforms are setup and manager is updated

* simplify assert statement

* changed the way waiting for unloading platforms
2019-09-03 17:16:13 +02:00
Malte Franken 9e6732e530 GeoNet NZ Quakes feed integration (#25736)
* initial working version

* support configured unit system and convert distance automatically

* properly unloading integration when removed and stopping refreshes

* ran isort

* fixed pylint

* introduced time filter of seven days into past

* adding unit tests

* fixed lint

* removed unused code

* added test case

* added test case for config flow

* fixed lint

* fixed comment

* removed unused test code

* increased test coverage

* fixed filtering by time

* changed wording in config flow

* reformatted with black

* removed unused logger

* fixed black

* changed default mmi

* reduced the options in the config flow form; fixed a few schema options and processing of data

* moved unsubscribing signals

* fixed minimum magnitude and modified tests

* fixed radius in imperial unit system

* increased test coverage

* simplified code

* fixed lint

* changed string formatting; simplified code

* removed unused strings

* added translation
2019-08-10 12:50:27 +02:00