Commit graph

90 commits

Author SHA1 Message Date
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
be7fc35dfa
Add EntityFeature enum to Alarm Control Panel () 2022-04-01 13:54:03 +02: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ä
5926961ed5
Use DeviceAutomationType in tests/components/[a-f]* () 2021-12-20 22:26:29 +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
Erik Montnemery
85786fd987
Make some device action tests more explicit ()
* Make some device action tests more explicit

* Adjust tests
2021-11-11 12:32:51 +01:00
posixx
547ede1e91
Implementation of new Vacation mode for MQTT-based alarm panels ()
* Impelentation of new Vacation Mode for MQTT-based alarm panels

* Fixed typo

* another typo fix

* Split integrations: remove manual_mqtt

* added newline

* Impelentation of new Vacation Mode for MQTT-based alarm panels

* Fixed typo

* another typo fix

* Split integrations: remove manual_mqtt

* added newline

* missing abbreviation

* Fix tests

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-24 13:22:49 +02:00
posixx
312531988a
Vacation Mode on Alarm Panels ()
Co-authored-by: Nathan Tilley <nathan@tilley.xyz>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Khole Jones <ktech6@outlook.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-07-01 17:26:32 +02:00
Erik Montnemery
08af791d4c
Improve editing of device conditions referencing non-added alarm () 2021-06-14 13:05:27 +02:00
Erik Montnemery
f9e9202e2d
Improve editing of device triggers referencing non-added alarm () 2021-06-13 00:07:25 +02:00
Erik Montnemery
3a739563b4
Improve editing of device actions referencing non-added alarm () 2021-06-12 23:43:28 +02:00
Joakim Sørensen
2f10f59717
Block custom integrations with missing or invalid version () 2021-05-17 15:48:41 +02:00
Erik Montnemery
9526701e57
Add 'for' to alarm device triggers () 2021-03-30 13:49:23 +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
Erik Montnemery
f99c27c6d4
Remove unneeded from_state from device triggers () 2021-02-08 11:09:45 +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
4e77969f5e
Drop use of mock_mqtt_component ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-06-23 10:17:22 -07:00
Erik Montnemery
6f7f5b4034
Rename AlarmControlPanel to AlarmControlPanelEntity () 2020-04-25 18:05:28 +02:00
starkillerOG
7bfc1d2840
Use "arming" state during transition in manual alarm panel ()
* 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
Franck Nijhof
bc5a2da7b7
Add transition support to scenes, cleanup blocking parameter () 2020-04-20 18:07:50 -07:00
springstan
51b9afe3c1
Add device condition for alarm_control_panel ()
* Initial commit

* Restricting conditions by supported_features, drop pending condition

* Added tests for no and minimum amount of conditions

* Address review comments

* Sort impors with isort

* Sort impors with isort v2
2020-03-16 18:08:06 -05:00
springstan
524a1a7587
Use f-strings in integrations starting with "A" ()
* Use f-strings in integrations starting with A

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

* Fix pylint by renaming variable

* Fix nested for loop in f-string for aprs device_tracker

* Break long lines into multiple short lines

* Break long lines into multiple short lines v2
2020-02-23 13:38:05 -08:00
Bas Nijholt
d020486929 sort imports according to PEP8 for alarm_control_panel () 2019-12-08 13:42:31 +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
springstan
8908dba5b4 Add device trigger for alarm_control_panel ()
* Added device trigger to alarm control panel

* Added supported features to check that device has certain trigger

* Fixed tests for device_trigger

* Fixed pylint error

* Removed pending trigger and removed trigger condition
2019-11-30 21:30:51 -08:00
SukramJ
1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions ()
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
Santobert
12f1a8f551 Add improved scene support to the alarm_control_panel integration ()
* Add improved scene support to the alarm_control_panel integration

* Add service description for alarm_arm_custom_bypass
2019-11-01 13:36:18 -07:00
Erik Montnemery
43c85c0549 Add device action support to the alarm_control_panel integration ()
* Add device action support to the alarm_control_panel integration

* Improve tests
2019-10-16 21:34:56 -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
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
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests ()
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
emontnemery
5b53bd6aa0
Move MQTT platforms under the component ()
* Move MQTT platforms under the component
2019-01-15 17:31:06 +01:00
emontnemery
44f6151548
Cleanup if discovered mqtt alarm can't be added ()
* Cleanup if discovered mqtt alarm can't be added
2019-01-08 16:49:47 +01:00
emontnemery
ae776e2d28
Add device registry to MQTT alarm control panel ()
* Add device registry to MQTT alarm control panel

* Add testcase test_entity_id_update
2018-12-19 19:27:23 +01:00
emontnemery
5e18d52302 Reconfigure MQTT alarm component if discovery info is changed () 2018-11-24 10:48:01 +01:00
Adam Mills
ce069be16e Update manual ACP tests to async () 2018-11-07 09:56:24 +01:00
liaanvdm
3c68db32d6 Restore manual alarm-control-panel state using async_get_last_state ()
* Restore manual alarm-control-panel state using async_get_last_state

This is to address issue 

* Added tests for restoring manual alarm state on startup

* Cleaned up test formatting

* Fixed more linting errors

* Changed async methods to use asynch/await syntax

* Removed unused asyncio import
2018-10-25 12:21:20 +02:00
Paulus Schoutsen
08fe7c3ece
Pytest tests ()
* Convert core tests

* Convert component tests to use pytest assert

* Lint 🤷‍♂️

* Fix test

* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Martin Berg
e922dd10ba Init sub-components using global var. () 2018-10-07 23:30:09 +02:00
Otto Winter
af89e7c50f Move more MQTT platforms to config entries ()
* Move more MQTT platforms to config entries

* Address comments
2018-09-28 16:57:17 +02:00
cdce8p
fa98a27df7 Remove service helper (2) ()
* alarm_control_panel

* automation

* camera

* climate

* counter

* fan

* Add legacy notes

* Fix tests
2018-09-26 09:49:55 +02:00
emontnemery
eb59f2dd3c Move MQTT discovery removal tests to platform test files () 2018-09-25 19:32:04 +02:00
Paulus Schoutsen
399040de46
Fix files left behind ()
* Light demo test to not write entity registry

* Fix Manual MQTT alarm control panel
2018-09-25 17:19:46 +02:00
Martin Berg
a5cb4e6c2b Use pyspcwebgw for SPC component ()
* Use pyspcwebgw library.

* Support alarm triggering.

* Update requirements.

* Add pyspcwebgw to test reqs.

* Also update script.

* Use dispatcher.

* Address review feedback.
2018-09-24 10:10:10 +02:00
Matthias Urlichs
0121e3cb04 Remove usage of "run_until_complete" ()
* De-run_forever()-ization

* Use asyncio.run (or our own implementation on Python <3.7)
* hass.start is only used by tests
* setup_and_run_hass() is now async
* Add "main" async hass.run method
* move SIGINT handling to helpers/signal.py
  * add flag to .run to disable hass's signal handlers
* Teach async_start and async_stop to not step on each other
  (more than necessary)

* shorten over-long lines

* restore missing "import asyncio"

* move run_asyncio to homeassistant.util.async_

* LOGGER: warn => warning

* Add "force" flag to async_stop

only useful for testing

* Add 'attrs==18.2.0' to requirements_all.txt

Required for keeping requirements_test_all.txt in sync, where it is in
turn required to prevent auto-downgrading "attrs" during "pip install"

* Fixes for mypy

* Fix "mock_signal" fixture

* Revert mistaken edit

* Flake8 fixes

* mypy fixes

* pylint fix

* Revert adding attrs== to requirements_test*.txt

solved by using "pip -c"

* Rename "run" to "async_run", as per calling conventions
2018-09-19 15:40:02 +02:00