Commit Graph

192 Commits

Author SHA1 Message Date
Jan Bouwhuis
a66c9bb7b6 Update stale doc strings in entity platform tests (#105526) 2023-12-12 08:28:08 +01:00
Jan Bouwhuis
5dd787aa10 Validate entity category for binary_sensor (#103464) 2023-11-06 10:34:06 +01:00
Erik Montnemery
9d3cdc85ca Use real devices in binary_sensor device condition tests (#102704) 2023-10-24 23:28:29 +02:00
Erik Montnemery
acc5edb088 Use real devices in binary_sensor device trigger tests (#102678) 2023-10-24 21:56:53 +02:00
Erik Montnemery
f0493b22d4 Use entity registry id in binary_sensor device conditions (#95251) 2023-06-26 18:17:27 +02:00
Erik Montnemery
4414f06ed2 Teach binary_sensor device trigger about entity registry ids (#94963)
* Teach binary_sensor device trigger about entity registry ids

* Update deconz test
2023-06-21 14:49:53 +02:00
Erik Montnemery
6a29ed8caa Replace assert_lists_same with pytest_unordered in integrations a-f (#94900) 2023-06-20 20:22:31 +02:00
Erik Montnemery
92bba4d7be Fix typo in binary_sensor tests (#94712) 2023-06-16 13:57:42 +02:00
Erik Montnemery
2406b235b4 Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
Jan Bouwhuis
ec98e22330 Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Erik Montnemery
3cca338c6e Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
J. Nick Koston
da5ad4a17d Update binary_sensor tests to avoid patching utcnow (#93474) 2023-05-24 13:17:11 -05: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
0cf5e9fb4a Add type hints to integration tests (part 2) (#87789)
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
Erik Montnemery
cc564026fa Move EntityCategory to homeassistant.const (#87792)
* 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 (#87726) 2023-02-08 13:28:44 -06:00
epenet
4142f0d15d Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
epenet
aa00114c2f Add return type to async tests without arguments (#87612) 2023-02-07 10:26:56 +01:00
Erik Montnemery
4655ed995e Fix resetting of attributes in EntityRegistry.async_get_or_create (#77516)
* Fix resetting of attributes in EntityRegistry.async_get_or_create

* Fix typing

* Fix resetting config entry

* Improve test

* Update tests
2022-08-30 21:07:50 +02: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
epenet
411fcad798 Use BinarySensorDeviceClass enum in binary_sensor device automations (#62635) 2022-01-04 16:46:21 +01:00
Franck Nijhof
60b2cdd069 Allow binary sensor state to be None (#60193) 2021-12-22 12:24:29 +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
Franck Nijhof
cf371ea8dd Remove deprecated base entity classes (#61006)
* Remove deprecated base entity classes

* Clean up tests
2021-12-05 13:53:52 +01:00
Erik Montnemery
49a27e12ad Add support to entity registry for overriding device_class (#59985) 2021-11-22 08:38:06 -08:00
Erik Montnemery
a989677bef Improve editing of device conditions referencing non-added binary sensor (#51831)
* Improve editing of device conditions referencing non-added binary sensor

* Update tests
2021-06-14 15:26:46 +02:00
Erik Montnemery
d9110b5208 Improve editing of device triggers referencing non-added binary sensors (#51700) 2021-06-10 13:06:01 +02:00
Joakim Sørensen
2f10f59717 Block custom integrations with missing or invalid version (#49916) 2021-05-17 15:48:41 +02:00
Franck Nijhof
5a2b5fe7c5 Yoda assertion style removed is (#48142) 2021-03-20 13:55:10 +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
Aaron Bach
6bf59dbeab Add significant change support to binary_sensor (#45677)
* Add significant change support to binary_sensor
2021-01-30 09:04:35 +01:00
Franck Nijhof
65cf2fcb6f Drop asynctest (#44746) 2021-01-01 22:31:56 +01: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
Franck Nijhof
1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Pascal Vizeli
c291d4aa7d Intelligent timeout handler for setup/bootstrap (#38329)
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
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
Erik Montnemery
b022e08db9 Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
Christian Clauss
1d537ad416 Fix typo: serivce --> service (#31217) 2020-01-27 19:56:26 +01:00
Ville Skyttä
e6388e186c Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Bas Nijholt
8f5e8c72c6 use isort to sort imports according to PEP8 for binary_sensor (#29622) 2019-12-08 22:02:08 +05:30
Erik Montnemery
cda7692f24 Add support for for to binary_sensor, light and switch device conditions (#27153)
* Add support for `for` to binary_sensor, light and switch device conditions

* Fix typing

* Fixup

* Fixup
2019-10-03 13:29:57 -07:00
Erik Montnemery
65ce3b49c1 Add support for for to binary_sensor, light and switch device triggers (#26658)
* Add support for `for` to binary_sensor, light and switch device triggers

* Add WS API device_automation/trigger/capabilities
2019-10-02 22:14:52 +02:00
Paulus Schoutsen
6fdff9ffab Reorg device automation (#26880)
* async_trigger -> async_attach_trigger

* Reorg device automations

* Update docstrings

* Fix types

* Fix extending schemas
2019-09-24 14:57:05 -07:00
Erik Montnemery
e5f6f33340 Add device automation support to binary_sensor entities (#26643)
* Add device automation support to binary_sensor entities

* turn_on -> turned_on

* Correct spelling of present

* Improve tests

* Fix strings

* Fix stale comment
2019-09-22 11:13:17 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Pascal Vizeli
a55afa8119 Update ha-ffmpeg 2.0 (#22427) 2019-03-27 07:55:05 +01: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