Commit Graph

88 Commits (ef4a9bf35478eac72a7f9b3cdd4bab923600d251)

Author SHA1 Message Date
Pascal Vizeli 1719d88602 Bugfix default values to timedelta (#5193)
* Bugfix default values to timedelta

* fix unittests
2017-01-06 00:16:12 +01:00
Dan Smith f71027a9c7 Nx584 maint (#5149)
* Update nx584 requirement to 0.4

There have been a few bug fixes to nx584 since 0.2, so this just updates
our requirement to pull in the newer version.

* Fix nx584 if no partitions are found

If we succeed in our connection to the panel but find no
configured partitions, then we will fall through to the bypass
probe and fail because 'zones' is never initialized. This fixes
both exception paths and adds a test that would poke it.
2017-01-03 08:19:33 +01:00
Pascal Vizeli 244cdf43d0 Async reduce coro (#5001)
* Asyncio coro reduce

* Replace comments
2016-12-26 14:10:23 +01:00
Pascal Vizeli 9a16054867 Bugfix create a task from a task in component update (#5033) 2016-12-21 15:11:14 +01:00
Pascal Vizeli 99f1ea9b59 Migrate alarm control panel to async (#4807)
* Merge alarm control panel to async

* fix lint
2016-12-11 14:39:20 -08:00
Paulus Schoutsen 98fe50d5ad Update after service calls (#4795)
* Update after service calls

* Service update: wrap async_update in create_task
2016-12-06 22:30:47 -08:00
Alberto Arias Maestro b0a800cc6d Update commands to match the strings in pynx584 (#4623)
The command string don't match the ones pynx584. See source code:

https://github.com/kk7ds/pynx584/blob/master/nx584/api.py#L68
2016-12-01 22:20:44 -08:00
jnimmo 1a117d0bea Add keypress & output control services to Envisalink component (#3932)
* Add keypress & output control services to Envisalink component

Add services to allow sending custom keypresses and activating
programmable outputs on an alarm control panel.
Implemented for the Envisalink alarm, and moving to new version of
pyenvisalink to support this.

Replicated the service handler mapping code from Cover component into
Alarm Control Panel to allow handling alternative schemas if required
by new services.

* Update requirements_all.txt

* Updated services.yaml

* Removed requirement to enter code in HA UI

Incorporated changes suggested by @sriram
https://github.com/srirams/home-assistant/commit/2f8deb70cb5f3621a69b6b9
acb72f8e29123650c

Including pending state for exit/entry delay

Clarified services to use the code passed to them as a first priority,
otherwise use the code from configuration

Swapped back to using NotImplementedError for the service definitions

* - Add support for alarm_keypress to manual alarm (functions like a standard alarm keypad where entering the code disarms or arms the alarm)
- Add tests for alarm_keypress to manual alarm
- Style corrections (too many returns, comment & whitespace issues)

* Removed alarm_output_control service as unable to incorporate in the demo/test in a meaningful way

* Add keypress & output control services to Envisalink component

Add services to allow sending custom keypresses and activating
programmable outputs on an alarm control panel.
Implemented for the Envisalink alarm, and moving to new version of
pyenvisalink to support this.

Replicated the service handler mapping code from Cover component into
Alarm Control Panel to allow handling alternative schemas if required
by new services.

* Update requirements_all.txt

* Updated services.yaml

* Removed requirement to enter code in HA UI

Incorporated changes suggested by @sriram
https://github.com/srirams/home-assistant/commit/2f8deb70cb5f3621a69b6b9
acb72f8e29123650c

Including pending state for exit/entry delay

Clarified services to use the code passed to them as a first priority,
otherwise use the code from configuration

Swapped back to using NotImplementedError for the service definitions

* - Add support for alarm_keypress to manual alarm (functions like a standard alarm keypad where entering the code disarms or arms the alarm)
- Add tests for alarm_keypress to manual alarm
- Style corrections (too many returns, comment & whitespace issues)

* Removed alarm_output_control service as unable to incorporate in the demo/test in a meaningful way

* Moved the Alarm_Keypress service into Envisalink component out of the generic

* Update envisalink.py

* Update services.yaml
2016-11-17 22:13:22 -08:00
Paulus Schoutsen 0f59bb208c Migrate callbacks to use schedule_update_ha_state (#4426)
* Migrate callbacks to use schedule_update_ha_state

* Migrate MQTT sensor callback to async

* Migrate wemo to not update inside schedule_update_ha_state

* Make MQTT switch async

* Fix nx584 test

* Migrate tellstick callback

* Migrate vera callback

* Alarm control panel - manual: use async callbacks

* Run the switch rest tests that work
2016-11-17 07:34:46 -08:00
Jesse Newland 4f86c9ecda Fix alarm.com I/O inside properties (#4307)
* Fix alarm.com I/O inside properties

* First line should end with a period

* Not needed

* Fetch state on init
2016-11-08 19:57:46 -08:00
Paulus Schoutsen ee5f228309 Make services yield (#4187)
* Make services yield

* Disable pylint abstract-method check

* add input_select

* add input_slider

* change to async vers.

* fix lint

* yield on add_entities as other components does
2016-11-03 18:32:14 -07:00
Fabian Affolter be272ac64a Disable too-many-* (#4107)
* Disable too-many-* and too-few-public-methods

* Remove globally disabled pylint warnings
2016-10-30 22:18:53 +01:00
Fabian Affolter d4b3f56d53 Maintenance (#4101)
* UPdate ordering, fix typos, and align logger messages

* Update import style, fix PEP257 issue, and align logger messages

* Updaate import style and align logger messages

* Update import style and align logger messages

* Update ordering

* Update import style and ordering

* Update quotes

* Make logger messages more clear

* Fix indentation
2016-10-29 09:12:43 -07:00
Jason Carter 0c0b02eb3d Moving updates out of state property (#3966) 2016-10-20 22:35:25 -07:00
Jason Carter 9cf2acb495 Concord232 alarm panel (#3842)
* Adding Concord232 Alarm Panel

* Adding Concord232 Zones as Sensors

* Updating requirements_all.txt

* Adding DOCType and making helper function a closure for clarity

* Fixing D400 error in build

* Fixing pylint errors

* Adding # pylint: disable=too-many-locals

* Updating with proper polling methods

* Fixing Merge issues

* Fixing DocStyle Issue

* Moving Import out of setup

* Fixing DocString

* Removing overthought GLOBAL
2016-10-17 19:59:41 -07:00
Dan Cinnamon edf812c0ea Envisalink Fixes + Enhancements (#3460)
* Added the ability to trigger the alarm.

* Bump version of pyenvisalink to 1.3

* Fixed an issue where the panic_type was not passed to the sub-components properly.

* Bump pyenvisalink version, and make default panic mode = police.

* Pass in event loop to pyenvisalink.

* Made the components play nicely with asyncio.

* Bump pyenvisalink to 1.6

* Bump up pyenvisalink, and better handle synchronous setup.
2016-09-20 23:51:10 -07:00
Paulus Schoutsen 4076ccf639 Use setup_component in tests (#3414)
* Alarm Control Panel Manual - use setup_component

* Update automation - zone tests

* Update climate - demo tests

* Update climate - generic thermostat tests

* Update cover - command line tests

* Update cover - demo tests

* Update device tracker tests

* Update device tracker - owntracks tests

* Update fan - demo tests

* Update garage door - demo tests

* Update light tests

* Update lock - demo tests

* Update media player - demo tests

* Update notify - command line tests

* Update notify - demo tests

* Update notify - file tests

* Update notify - group tests

* Update sensor - mfi tests

* Update sensor - moldindicator tests

* Update sensor - mqtt room tests

* Update switch - command line

* Update switch - flux

* Update switch tests

* Update scene tests

* Fix wrong default port for mfi switch
2016-09-17 10:29:58 -07:00
Marcelo Moreira de Mello 9bbe7be684 Fixed voluptuous to accept string instead positive_int for CODE on Simplisafe (#3310) 2016-09-11 09:07:13 +02:00
Fabian Affolter fb0232429e Use constants and update ordering (#3268)
🐬
2016-09-08 18:32:32 -06:00
Fabian Affolter 02848b3949 Use voluptuous for nx584 alarm (#3231)
* Migrate to voluptuous

* Fix pylint issue
2016-09-08 23:06:57 +02:00
Fabian Affolter 7aafa309c9 Use voluptuous for Verisure (#3169)
* Migrate to voluptuous

* Update type and add missing config variable
2016-09-06 18:18:34 -07:00
Fabian Affolter 9d4ccb1f49 Migrate to voluptuous (#3230)
🐬
2016-09-06 18:03:43 -06:00
Fabian Affolter e00f9339d1 Use voluptuous for Alarm.com (#3229) 2016-09-06 23:48:32 +02:00
Kevin Gottsman 781fe9c54e Fix logging message for disarm (#2857) 2016-08-16 20:53:59 -07:00
Tobie Booth abaffc2d8c add disarm_after_trigger to manual alarm panel 2016-08-13 12:53:32 -05:00
Tobie Booth 1e3f7ad9a4 Return to previous alarm state after trigger (#2580) 2016-08-13 12:53:32 -05:00
Per Sandström 8568773e7d add changed_by attribute to alarm control panel (#2737) 2016-08-08 09:00:20 -07:00
Robbie Trencheny a93195610a Add alarm control panel services.yaml
...because I was almost done being bored
2016-07-31 11:49:30 -07:00
Fabian Affolter bef2f87ddc Docstrings (#2502)
* Update docstrings

* Update docstrings

* Add link to docs
2016-07-12 16:46:29 +02:00
Marcelo Moreira de Mello - mmello cf5aeebba6 - Added code validation on Simplisafe module on alarm_control_panel (#2455) 2016-07-06 21:55:47 -07:00
William Scanlon a74cdc7b0d SimpliSafe Alarm (#2409) 2016-07-02 11:21:15 -07:00
Dan Cinnamon cb6f50b7ff Envisalink support (#2304)
* Created a new platform for envisalink-based alarm panels (Honeywell/DSC)

* Added a sensor component and cleanup

* Completed initial development.

* Fixing pylint issues.

* Fix more pylint issues

* Fixed more validation issues.

* Final pylint issues

* Final tweaks prior to PR.

* Fixed final pylint issue

* Resolved a few minor issues, and used volumptous for validation.

* Fixing final lint issues

* Fixes to validation schema and refactoring.
2016-06-19 10:45:07 -07:00
Paulus Schoutsen 30f74bb3ca Migrate to generic discovery method (#2271)
* Migrate to generic discovery method

* Add tests for discovery
2016-06-11 17:43:13 -07:00
Per Sandström 4850a65ed0 add reconnect retry and longer timeouts for verisure (#1944) 2016-05-03 18:53:11 -07:00
Jan Harkes 298a1c2af7 Service validation for alarm_control_panel component. 2016-04-13 13:45:11 -04:00
Jan Harkes a7016e4b32 Move CONF_STATE_TOPIC, CONF_COMMAND_TOPIC and CONF_RETAIN to mqtt component. 2016-04-06 22:51:39 -04:00
Jan Harkes 0bd4e15fcb Config validation for MQTT alarm_control_panel platform. 2016-04-06 22:51:38 -04:00
MartinHjelmare c56701baaf Refactor reproduce_state for scene component
* Add tests to reach full coverage for helpers/state.py.
* Refactor reproduce_state function in helpers/state.py. Add two dicts,
	as global constants, service_attributes and service_to_state. Use
	these in combination with the dict of services per domain from
	ServiceRegistry, to find the correct service to use in a scene state
	change.
* Use break statement in for loop, to break if service was selected
	to update state, in preference to update state attributes, ie state
	update takes precedence.
* Add ATTR_CODE and ATTR_CODE_FORMAT in const. Import these in
	alarm_control_panel and lock platforms instead of making duplicate
	constants in multiple modules.
* Use ATTR_MEDIA_CONTENT_TYPE and ATTR_MEDIA_CONTENT_ID in media_player
	platform in SERVICE_PLAY_MEDIA and play_media methods, instead of
	'media_type' and 'media_id'.
* Fix PEP257 in modified files.
2016-03-09 18:52:05 +01:00
Fabian Affolter 3a4250133a Fix PEP257 issues 2016-03-07 20:21:43 +01:00
Fabian Affolter 1e97d31711 Modify docstrings to match PEP257 2016-03-07 16:45:21 +01:00
Per Sandström d7e3c6a442 verisure refactoring and fix reconnect 2016-02-27 21:50:19 +01:00
Fabian Affolter 4563c54a3e Add link to docs and modify docstrings to match PEP257 2016-02-24 10:38:06 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Dan Smith 96dde18ae3 Fix alarmdotcom requirement 0.0.7 removed
Looks like alarmdotcom just released 0.1.1 and deleted 0.0.7 which is
breaking our build.
2016-02-17 08:41:46 -08:00
Dan Smith 22865e5d96 Add nx584 as a sensor platform
This allows you to get every door, window, smoke, etc zone from your security
panel into HA. This uses the live eventing feature of pynx584, which means you
get instantaneous signaling into HA when a door opens or something happens,
which is handy for automating lights on when doors open after dark, etc.

Requires update to pynx584 0.2
2016-02-16 20:24:32 -08:00
Fabian Affolter 0bb63bf3f0 Move configuration details to docs and add link 2016-02-07 12:36:29 +01:00
Dan Smith 3575ddb6ef Add Caddx/GE/Interlogix NetworX alarm panel support
This adds support for NetworX-based alarm panels and should work for
any such panel equipped with a NX584 serial interface module. This
includes NX-4/6/8/8E, where the NX8E has this interface built-in.

It requires the pynx584 module, and requires running the server
component somewhere that has connectivity to the panel via serial,
which may include a serial-over-lan connection.
2016-02-07 03:06:58 +00:00
Dan Smith 3616d7a7ea Fix alarm service handler state updates
This changes the service handler dispatch code to always
call update_ha_state(), and cleans up the alarm platforms that
were calling it themselves.
2016-02-06 21:11:28 +00:00
Fabian Affolter 847e92f57a Update docstrings 2016-02-03 00:01:26 +01:00
Paulus Schoutsen 880bd011a9 Merge pull request #908 from persandstrom/verisure_code_digits
Verisure - code digits settings
2016-01-16 09:04:53 -08:00