Commit graph

85 commits

Author SHA1 Message Date
Erik Montnemery
e404441e8c
Teach lock device trigger about entity registry ids () 2023-06-21 14:51:09 +02:00
Erik Montnemery
fd822bce56
Replace assert_lists_same with pytest_unordered in integrations h-m () 2023-06-20 20:16:25 +02:00
Jan Bouwhuis
ec98e22330
Add type hints for stub_blueprint_populate fixture ()
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik Montnemery
3cca338c6e
Improve blueprint test fixtures () 2023-05-25 13:45:19 +02:00
G Johansson
0bda869553
Lock entity options () 2023-05-08 22:06:11 +02:00
Franck Nijhof
ed79265843
Enable Ruff PT006 ()
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet
ea11a30a35
Add type hints to integration tests (part 13) () 2023-02-13 14:38:37 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const ()
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Franck Nijhof
51a9f65a01
Clean up unnecessary registry mocks from Core tests () 2023-02-08 13:28:44 -06:00
epenet
f75ac17554
Add type hints to integration tests (j-m) () 2023-02-08 19:06:59 +01:00
epenet
aa00114c2f
Add return type to async tests without arguments () 2023-02-07 10:26:56 +01:00
Jan Bouwhuis
b03677db1c
Add validation for lock component ()
* Add validation for lock integration

* Add LockEntityFeature.OPEN for lock group

* Correct tests google_assistant for extra entity

* Validate feature when registering service

* Update tests

* Add LockFeature.OPEN with group
2023-01-23 13:08:00 +01:00
Erik Montnemery
5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary ()
* 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 () 2022-04-20 21:41:59 +02:00
Erik Montnemery
64381acbaf
Mark device actions from hidden or auxiliary entities as secondary () 2022-04-20 10:48:46 -07:00
Franck Nijhof
721db6d962
Add EntityFeature enum to Lock () 2022-04-02 20:57:32 -07:00
Franck Nijhof
8aff8d89d2
Clean up async_reproduce_state helper usage () 2022-03-24 14:40:54 +01:00
Ville Skyttä
9b437ef146
Remaining DeviceAutomationType bits ()
* Use DeviceAutomationType in missed tests/components/*

* Tighten device automation type hints
2021-12-21 20:05:48 +02:00
Ville Skyttä
c5e6489475
Use DeviceAutomationType in tests/components/[h-l]* () 2021-12-20 22:18:53 +01:00
Franck Nijhof
cf371ea8dd
Remove deprecated base entity classes ()
* Remove deprecated base entity classes

* Clean up tests
2021-12-05 13:53:52 +01:00
J. Nick Koston
9b705ad6df
Update lock entity to support locking, unlocking, jammed () 2021-07-20 18:12:56 +02:00
Erik Montnemery
6ab37881c9
Improve editing of device actions referencing non-added lock () 2021-06-12 21:31:30 +02:00
Joakim Sørensen
2f10f59717
Block custom integrations with missing or invalid version () 2021-05-17 15:48:41 +02:00
Erik Montnemery
9d8521169b
Add 'for' to lock device triggers ()
* Add 'for' to lock device triggers

* Update tests/components/lock/test_device_trigger.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update test_device_trigger.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-30 16:40:57 +02:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ()
* 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
Aaron Bach
85e6bc581f
Add significant change support to lock () 2021-01-30 09:03:54 +01:00
Paulus Schoutsen
b3be708db6
Add default config if not there ()
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-11-25 15:10:04 +01:00
Pascal Vizeli
c291d4aa7d
Intelligent timeout handler for setup/bootstrap ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-05 14:58:19 +02:00
Erik Montnemery
b30d117e7d
Rename LockDevice to LockEntity () 2020-04-25 18:02:41 +02:00
Franck Nijhof
bc5a2da7b7
Add transition support to scenes, cleanup blocking parameter () 2020-04-20 18:07:50 -07:00
Franck Nijhof
30c6ace0f3
Rewrite MQTT & demo Lock tests ()
* Refactor tests to remove tests.lock.common

* Remove unused is_locked hass binding

* Import constants via entity component

* Import constants via entity component

* Fix light vs lock in naming
2020-04-10 00:40:51 +02:00
Christian Clauss
1d537ad416 Fix typo: serivce --> service () 2020-01-27 19:56:26 +01:00
Bas Nijholt
3b0f29fe95 sort imports according to PEP8 for lock () 2019-12-09 12:19:11 +01:00
Paulus Schoutsen
02d9ed5e36
Do not select all entities when omitting entity ID in service call ()
* 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
78657bfbaf Add lock device triggers ()
* Add lock device triggers

* Lint
2019-11-07 12:26:59 +01:00
Erik Montnemery
6d083969c2 Add device action support to the lock integration ()
* Add device action support to the lock integration

* Check that the enitity supports open service
2019-10-17 17:20:10 -07:00
Erik Montnemery
15820c6751 Add device condition support to the lock integration () 2019-10-12 12:53:15 -07:00
Santobert
cc4926afb1 lock_reproduce_state () 2019-10-04 14:29:53 -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 ()
* Convert some test helpers to coroutines

* Fix tests
2019-04-25 10:14:16 +02:00
Erik Montnemery
38d92b2abf Fix optimistic mode and add tests () 2019-04-10 13:56:34 -07:00
Paulus Schoutsen
1ddc249989
Consolidate more platforms ()
* 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 ()
* 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 

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00
Paulus Schoutsen
f3b20d138e Embed Z-Wave platforms () 2019-02-07 22:50:59 +01:00
Paulus Schoutsen
e2d3c27e85
Embed all platforms into components ()
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00
emontnemery
5b53bd6aa0
Move MQTT platforms under the component ()
* Move MQTT platforms under the component
2019-01-15 17:31:06 +01:00
emontnemery
0f3b6f1739
Reconfigure MQTT lock component if discovery info is changed ()
* Reconfigure MQTT lock component if discovery info is changed

* Use dict[key] for required config keys and keys with default config schema values.
2019-01-14 21:01:42 +01:00
emontnemery
bb37cf906c
Cleanup if discovered mqtt lock can't be added ()
* Cleanup if discovered mqtt lock can't be added
2019-01-08 16:45:38 +01:00
Austin Drummond
fb5b5223fb Added zwave lock state from alarm type workaround ()
Thank you 👍 

* added zwave lock state from alarm type workaround

* fixed test indents

* more linting fixes

* one more linting fix

* simplified logic

* fixed lint new lines

* fixed merge conflict issue

* fixed definition of _alarm_type_workaround in zwave lock
2019-01-05 09:59:43 +01:00
emontnemery
fed5d0f5be
Add device registry to MQTT lock () 2018-12-19 19:26:07 +01:00