Commit Graph

31 Commits (dc0d065901096612a608c91acf2d0ea50df19a41)

Author SHA1 Message Date
Franck Nijhof d645e80ccd
Clean up async_update_entity helper usage (#68641) 2022-03-25 15:22:58 -07:00
Dave T cabd6375d1
Use DeviceClass Enums in canary tests (#62113) 2021-12-16 21:47:59 +01:00
Erik Montnemery 49a27e12ad
Add support to entity registry for overriding device_class (#59985) 2021-11-22 08:38:06 -08: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
Joakim Sørensen 8cb3a485e0
Fix Canary sensor state (#54380) 2021-08-10 09:19:28 +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
jan iversen 6a4f414236
Change HomeAssistantType to HomeAssistant (#49522) 2021-04-21 15:53:06 -10:00
Ville Skyttä 2fb3be50ab
Make DeviceRegistry.async_get_device connections arg optional (#44897)
* Make async_get_device connections Optional, default None

* Remove unnecessary async_get_device connections arg usages

Some of these were using an incorrect collection type, which didn't
cause issues mostly just due to luck.
2021-01-07 13:49:45 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen ec1b9c2099
Fix mfi test (#43067) 2020-11-11 00:03:16 +01:00
Chris Talkington b9d34603e4
Use canary fixture for options flow test (#41817) 2020-10-14 08:17:36 +02:00
J. Nick Koston 3748c3c985
Fix canary test doing IO and failing when the cloud is offline (#41799) 2020-10-13 15:57:00 -05:00
Simone Chemelli 7554c8d6c5
Add missing unit for signal strength (#40436)
* Added missing unit for signal strength

* Added one more unit

* Replaced string with variable

* Fixed wrong import

* Fix import

* Replaced string with variable

* Fixed wrong import

* Apply suggestions from code review

* Black

* Again a fix :-(

* iSort

* iSort after merge

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-10-01 16:14:29 +02:00
Chris Talkington d93141c1a9
Use DataUpdateCoordinator for canary (#40691)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-01 10:26:26 +02:00
Chris Talkington 432911c994
Apply code review for canary config flow (#40355)
* apply code review for canary config flow

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update camera.py

* Update camera.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update __init__.py
2020-09-20 17:38:02 -05:00
Chris Talkington 0c8b530aa2
Add device info to canary camera and sensors (#40053)
* add device info to canary sensors

* Update test_sensor.py

* Update sensor.py

* Update sensor.py

* Update test_sensor.py

* Create const.py

* Update sensor.py

* Update test_sensor.py

* Update sensor.py

* Update test_sensor.py

* Update camera.py

* Update camera.py

* Update sensor.py

* Update camera.py

* Update camera.py
2020-09-19 10:09:40 -05:00
Chris Talkington f563068ce6
Add config flow to canary (#40055)
* Create config_flow.py

* Update config_flow.py

* work on config flow

* Update test_config_flow.py

* Update __init__.py

* Update camera.py

* Update test_config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update conftest.py

* Update test_config_flow.py

* Update test_init.py

* Update test_init.py

* Apply suggestions from code review

* Update camera.py

* Update test_init.py

* Update camera.py

* Update __init__.py

* Update test_init.py

* Update test_init.py

* Update __init__.py

* Update __init__.py

* Apply suggestions from code review

* Update __init__.py

* Update test_init.py

* Update __init__.py

* Update __init__.py

* Update config_flow.py

* Update test_config_flow.py

* Update config_flow.py

* Update config_flow.py
2020-09-18 23:22:19 -05:00
Chris Talkington 056e712667
Add device class to canary sensors (#40050)
* add device class to canary sensors

* Update test_sensor.py

* Update sensor.py

* Update sensor.py
2020-09-13 21:29:59 -05:00
Chris Talkington 9511103e26
Add unique_id to canary alarm_control_panel (#40041)
* add unique_id to canary alarm_control_panel

* Update test_alarm_control_panel.py

* Update alarm_control_panel.py

* Apply suggestions from code review

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-09-13 18:52:40 -05:00
Chris Talkington 00acb180d6
Add canary alarm_control_panel tests (#40029)
* add canary alarm_control_panel tests

* Update .coveragerc

* Create test_alarm_control_panel.py

* Update __init__.py

* Update __init__.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update __init__.py

* Update __init__.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py

* Update test_alarm_control_panel.py
2020-09-13 16:36:26 -05:00
Chris Talkington 17efa1bda5
Improve canary tests (#39956) 2020-09-13 11:32:41 -05:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Paulus Schoutsen c33edbe5bb
Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -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
springstan 78d87dc40f
Use TEMP_CELSIUS constant (#33963) 2020-04-10 19:17:46 +02:00
chiefdragon 3e8728ad5f
Fix issue #23758 - Restore Canary sensors and ensure alarm con… (#32627)
* Fixed missing Canary sensors and Canary alarm control panel that was not updating correctly

* Resolved pylinting warnings in original tests
2020-03-11 11:58:42 -07:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Bas Nijholt 080c702d4f Sort imports according to PEP8 for components starting with "C" (#29763) 2019-12-09 18:56:21 +01:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00
Paulus Schoutsen b8cc547fa3
Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00