Commit graph

25 commits

Author SHA1 Message Date
J. Nick Koston c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
G Johansson 3c3f512583
Remove setup_platform for demo (#100867) 2023-10-15 23:12:41 +02:00
Franck Nijhof 469321157d
Raise on invalid (dis)arm code in manual alarm (#90579) 2023-03-31 16:08:16 +02:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 6c430e03bc
Add type hints to integration tests (part 14) (#88005) 2023-02-15 10:31:43 +01:00
epenet f75ac17554
Add type hints to integration tests (j-m) (#87704) 2023-02-08 19:06:59 +01:00
Franck Nijhof e50a531cd9
Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
Jan Bouwhuis 8051e5d4f4
Additional tests to improve coverage of manual and manual_mqtt (#84424) 2022-12-22 10:14:54 +01:00
Paolo Bonzini 52594717ca
Fix manual.alarm_control_panel RestoreEntity bugs (#82990)
* manual: add previous state for TRIGGERED as well

This will be useful to properly restore timers on restart.

* manual: correctly restore timers on startup
2022-12-19 11:19:24 +01: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
mbo18 a28593f133
Add vacation mode to manual alarm_control_panel (#55340)
* Add vacation mode

* Add vacation to demo

* Deduplicate code in tests
2021-09-01 09:34:21 +02:00
Franck Nijhof 5a2b5fe7c5
Yoda assertion style removed is (#48142) 2021-03-20 13:55:10 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01: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 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
starkillerOG 7bfc1d2840
Use "arming" state during transition in manual alarm panel (#32950)
* Manual Alarm Control Panel: use proper "Arming" state

* Update previous and next attributes

* add CONF_ARMING_TIME

* Split up arming and pending time, pending_time --> arming_time

* update tests

* fix issort

* fix issort

* fix demo platform

* fix alarm test

* remove arming_time from the triggered state

* Match previous default "delay_time"

* fix tests

* fix arming state when triggering

* fix arming _arming_time_by_state for Triggering state

* change to not in list

* Update homeassistant/components/manual/alarm_control_panel.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* async_update_ha_state -> async_write_ha_state

* black formatting

* add Callback

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* import callback

* update device triggers alarm_control_panel

* Update test_device_trigger.py

* Update device_trigger.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-24 00:07:07 +02:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Bas Nijholt 710680d604 use isort to sort imports for components starting with 'm' (#29772) 2019-12-09 18:50:40 +05:30
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen f3e4e8dce8
Fix alarm control panel tests (#24586) 2019-06-17 20:23:12 -07:00
Kevin Cooper 1460f7bd80 Add code_arm_required to manual alarm (#22618)
* Add code_arm_required to manual alarm

* Add fix for alarm front end more-info-alarm_control_panel
2019-06-17 14:59:20 -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