Commit Graph

28 Commits (dcca29ef68e74cfcbca1c7bf7309e1041a8b7f90)

Author SHA1 Message Date
javicalle c8950870a2
Propagate RFLink 'send_command' event (#43588)
* propagate send_command event

* propagate send_command event
2021-03-18 12:25:00 +01: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
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Paulus Schoutsen 5dac3883b0
Stub light profiles (#42232) 2020-10-23 16:28:21 +02:00
Philip Allgaier dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
Ville Skyttä 5e90a4d000
Use more state attribute name constants (#40428) 2020-09-21 23:03:39 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Ville Skyttä 6ae9399237
Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
J. Nick Koston 89a9634d35
Use eventloop for scheduling (#37184)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-06-29 09:39:24 -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
tubalainen d672eed331
Add rflink binary_sensor allon and alloff commands (#32411)
* added "allon" and "alloff" to the binary_sensor

Ref to the issue: https://github.com/home-assistant/core/issues/32399

* Cosmetic fix

* Fix format

* Update test

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2020-04-17 17:15:04 +02:00
springstan 78d87dc40f
Use TEMP_CELSIUS constant (#33963) 2020-04-10 19:17:46 +02:00
springstan eae21be5b9
Improve string formatting v6 (#33698) 2020-04-07 23:14:28 +02:00
Ziv 3697ea7b27
Remove uncaught exceptions from rflink (#33709)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-04-07 09:37:54 -07:00
springstan 67c3a4c970
Improve string formatting v7 (#33705) 2020-04-05 17:34:24 -05: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
Paulus Schoutsen 9e7185c676
Write state if schedule update state from async context (#31758)
* Write state if schedule update state from async context

* Fix most tests

* Fix test and PS4 I/O in event loop

* Fix ps4 better
2020-02-13 10:22:06 -08:00
Paulus Schoutsen c85a7934ed
Add brightness_step to light.turn_on (#31452)
* Clean up light turn on service

* Add brightness_step to turn_on schema

* Fix import

* Fix imports 2

* Fix RFLink test
2020-02-04 16:13:29 -08:00
Paulus Schoutsen 01dad31adc
Fix service helper not handling sync methods (#31254)
* Fix service helper not handling sync methods

* Add legacy support for returning coroutine objects

* Fix tests

* Fix tests

* Convert demo cover to async
2020-01-29 16:27:25 -08:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Ville Skyttä d6f317c0a9
Remove deprecated rflink configs (#29972)
They've been deprecated and automatically replaced since July 2017
already, fe6a4b8ae5
2019-12-15 22:57:23 +02:00
javicalle dd8fc41747 Move imports in rflink component (#27367)
* Move imports in rflink component

* import order

* import order

* Update __init__.py

* Update __init__.py

I don't understand why tests are failing...

* Fix RFLink imports

* Fix monkeypatch for 'create_rflink_connection'

* isort for rflink classes
2019-10-13 22:19:11 +02:00
Robbert Müller 7a156059e9 Switch on/off all lights, and wait for the result (#27078)
* Switch on/off all lights, and wait for the result

Reuses the parallel_updates semaphore.
This is a small crutch which serializes platforms which already do tis
for updates. Platforms which can parallelize everything, this makes it
go faster

* Fix broken unittest

With manual validation, with help from @frenck, we found out that the
assertions are wrong and the test should be failing.

The sequence requested is
OFF
ON

without cancelation, this code should result in:
off,off,off,on,on,on

testable, by adding a `await hass.async_block_till_done()` between the
off and on call.

with cancelation. there should be less off call's so
off,on,on,on

* Adding tests for async_request_call

* Process review feedback

* Switch gather with wait

* 👕 running black
2019-10-06 08:23:12 -07:00
fmartens 5b77a357e6 Inverted rflink cover (#26038)
* Added InvertedRflinkCover class to support COCO/KAKU ASUN-650 devices

* Rename TYPE_NORMAL to TYPE_STANDARD

* Cleaning up code and removed unused imports

* Added unit tests for InvertedRflinkCover

* less if/else statements

* Autoresolve type for newkaku

* Updated tests for InvertedRflinkCover

* Added unit test for standard cover without specifying type

* Updated comments in unit tests

* Updated unit test configuration and comments to be more explanatory

* Restore variable names in first part of the unit test that have been changed during a search and replace

* Reformated the code according to 4de97ab

* remove blank lines at end of rflink test_cover.py

* Replace single with double quote in test_cover.py

* Replaced single quotes with double qoutes and fixed formatting

* Black improvements

* Reformated the code of the unit test.

* entity_type_for_device_id should return 'TYPE_STANDARD' instead of 'None'
2019-09-01 17:52:43 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Jason Hu c82d2cb11c
Cherry pick test fix (#22939) 2019-04-09 13:59:15 -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