Commit Graph

84 Commits (e43802eb0769fb8850f9533de873d94b260bc1e2)

Author SHA1 Message Date
Erik Montnemery 31a787558f
Ensure recorder test fixture is setup before hass fixture (#80528)
* Ensure recorder test fixture is setup before hass fixture

* Adjust more tests
2022-10-19 07:58:47 +02:00
Erik Montnemery 5f2b4001f3
Separate recorder database schema from other classes (#72977)
* Separate recorder database schema from other classes

* fix logbook imports

* migrate new tests

* few more

* last one

* fix merge

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-06-07 14:41:43 +02:00
Franck Nijhof bfb47eb212
Final clean up of helpers accessed via hass (#72032)
* Final clean up of helpers accessed via hass

* Fix circular dep

* Fix import
2022-05-17 23:42:37 +03:00
Erik Montnemery 524920dd2e
Add 'toggle' device action to fans (#71570) 2022-05-09 13:49:35 +02:00
Erik Montnemery 28ebab9c5a
Simplify waiting for recorder in tests (#70647) 2022-04-25 12:04:47 +02:00
Erik Montnemery 982e314de6
Use recorder_mock in tests (#70363)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-22 19:29:44 -10:00
Erik Montnemery 5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Erik Montnemery 150f173eed
Mark device conditions from hidden or auxiliary entities as secondary (#70333) 2022-04-20 21:41:59 +02:00
Erik Montnemery 64381acbaf
Mark device actions from hidden or auxiliary entities as secondary (#70278) 2022-04-20 10:48:46 -07:00
Diego Elio Pettenò 16de5edcbf
Don't attempt to set invalid fan percentage and preset_mode (try 3) (#70294)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-19 23:59:57 -07:00
J. Nick Koston 9e390996cc
Exclude static fan attributes from being recorded in the database (#69192) 2022-04-03 15:52:46 +02:00
Franck Nijhof 8aff8d89d2
Clean up async_reproduce_state helper usage (#68617) 2022-03-24 14:40:54 +01:00
J. Nick Koston 723dcbafca
Complete fan speed transition from #59781 (#67743) 2022-03-09 10:38:12 +01:00
Erik Montnemery 513d6cc467
Change value of device_automation constant (#64296)
* Change value of constant CONF_CHANGED_STATES

* Adjust tests
2022-01-17 16:34:40 +01:00
Erik Montnemery e9b746e874
Add turned on or off device trigger to toggle entity (#61089)
* Add turned on or off device trigger to toggle entity

* Renamed changed_states trigger to toggled

* Adjust tests

* Fix homekit triggers test

* Add tests

* Adjust tests after rebase

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-01-03 10:41:30 +01:00
Ville Skyttä 9b437ef146
Remaining DeviceAutomationType bits (#62508)
* Use DeviceAutomationType in missed tests/components/*

* Tighten device automation type hints
2021-12-21 20:05:48 +02:00
Ville Skyttä 5926961ed5
Use DeviceAutomationType in tests/components/[a-f]* (#62440) 2021-12-20 22:26:29 +01:00
J. Nick Koston 7fbe1dbc99
Remove legacy fan compatibility shim (#59781) 2021-12-03 21:57:46 -08:00
Michael 771922b871
Add support for property attribute shorthand in Fan entity (#59649) 2021-11-16 01:25:22 +01:00
Erik Montnemery fe4ca18881
Refactor fan device triggers to use ToggleEntity triggers (#48321) 2021-03-30 00:09:41 +02:00
Ville Skyttä dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
J. Nick Koston f2b303d509
Implement percentage step sizes for fans (#46512)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-02-18 21:05:09 -10:00
J. Nick Koston 068d1b5eb8
Separate fan speeds into percentages and presets modes (#45407)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: John Carr <john.carr@unrouted.co.uk>
2021-01-27 17:44:36 -06:00
Paulus Schoutsen b3be708db6
Add default config if not there (#43321)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-11-25 15:10:04 +01:00
Erik Montnemery d61998e184
Raise in base implementation of FanEntity.oscillate (#43354) 2020-11-19 12:05:52 +01:00
Sharif Nassar 9ee97cb213
Convert fan tests to pytest style (#41631) 2020-10-14 11:07:26 +02:00
Paulus Schoutsen c33edbe5bb
Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -07:00
Xiaonan Shen 2581b031d9
Fix fan not checking supported_features (#35248)
* Fix fan not checking supported_features

* Fix pylint

* Fix test

* Code cleanup

* Fix fan demo

* Code style improvement
2020-05-06 09:58:07 +02:00
Franck Nijhof bc5a2da7b7
Add transition support to scenes, cleanup blocking parameter (#34434) 2020-04-20 18:07:50 -07:00
Franck Nijhof 98a2efcbab
Collection of random (mainly) test improvements (#33733) 2020-04-06 12:51:48 +02:00
springstan ad102b3840
Use f-strings in integrations starting with "F"and"G" (#32150)
* Use f-strings in integrations starting with F

* Use f-strings in tests for integrations starting with F

* Use f-strings in integrations starting with G

* Use f-strings in tests for integrations starting with G

* Fix pylint error

* Fix broken test
2020-02-24 17:54:20 -08:00
Christian Clauss 1d537ad416 Fix typo: serivce --> service (#31217) 2020-01-27 19:56:26 +01:00
Paulus Schoutsen ed6aef2fd7
Implement capability attributes (#30545)
* Implement capability attributes

* Fix HeOS update order

* Fix test
2020-01-08 21:22:56 +01:00
Bas Nijholt a38f3ac9c6 use isort to sort imports according to PEP8 for fan (#29632) 2019-12-08 21:28:47 +05:30
Paulus Schoutsen 02d9ed5e36
Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
2019-12-02 16:23:12 -08:00
Paulus Schoutsen a80baf2e5f Add fan device condition (#28549) 2019-11-07 16:29:10 +01:00
Paulus Schoutsen 5032c5a04c Add fan device trigger (#28545) 2019-11-07 12:38:58 +01:00
Paulus Schoutsen 2c607c836f Add device action to fan (#28550) 2019-11-07 12:26:10 +01:00
Santobert e088119d6d fan_reproduce_state (#27227) 2019-10-05 12:42:37 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Erik Montnemery 5376e15286 Convert some test helpers to coroutines and adjust tests (#23352)
* Convert some test helpers to coroutines

* Fix tests
2019-04-25 10:14:16 +02:00
Paulus Schoutsen 1ddc249989
Consolidate more platforms (#22308)
* Consolidate final platforms

* Fix some tests

* Fix more tests

* Fix more tests
2019-03-23 20:22:35 -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 f3b20d138e Embed Z-Wave platforms (#20810) 2019-02-07 22:50:59 +01:00
Daniel Høyer Iversen 1bd31e3459 Change STATE_UNKOWN to None (#20337)
* Change STATE_UNKOWN to None

* Change STATE_UNKOWN to None

* tests

* tests

* tests

* tests

* tests

* style

* fix comments

* fix comments

* update fan test
2019-01-24 08:20:20 +01:00
emontnemery 5b53bd6aa0
Move MQTT platforms under the component (#20050)
* Move MQTT platforms under the component
2019-01-15 17:31:06 +01:00
emontnemery 203701bc7c
Cleanup if discovered mqtt fan can't be added (#19741)
* Cleanup if discovered mqtt fan can't be added
2019-01-08 16:51:03 +01:00
emontnemery 1568de62df Correct calls to subscription.async_unsubscribe_topics (#19414)
* Correct calls to subscription.async_unsubscribe_topics

* Review comments

* Add testcases
2018-12-19 14:05:24 +01:00
emontnemery 4a4ed128db Reconfigure MQTT fan component if discovery info is changed (#18177) 2018-11-27 11:22:55 +01:00
Adam Mills 1f290bad94 Update fan/demo tests to async (#18109)
* Update fan/demo tests to async

* Use async_create_task
2018-11-02 21:08:22 +01:00