Commit Graph

9 Commits (0549bc02901b16ca653984713f3b41166fdbb445)

Author SHA1 Message Date
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 6879e39d6c Fix PEP257 issues 2016-03-07 22:13:18 +01:00
Fabian Affolter 9c4fe6e7fe Modify docstrings to match PEP257 2016-02-28 12:03:47 +01:00
turbokongen@hotmail.com 41f908ed39 Added support for lock connected to Verisure system. 2016-02-09 13:17:05 +01:00
Paulus Schoutsen 8841eef2b7 Add tests for lock component 2015-11-29 11:44:27 -08:00
Paulus Schoutsen fabd0ced3f Make DEPENDENCIES optional for components 2015-11-26 13:11:59 -08:00
miniconfig 105dc2847e Changed locked method of lock support to "is_locked".
Added lock and unlock methods
Updated wink components to use the new version of the wink library.
2015-11-20 16:34:27 -05:00
miniconfig fa7391cdf6 Changed do_lock and do_unlock methods to lock and unlock.
Implemented state method.
Fixed locked method for demo interface.
Changed LockDevice to extend Entity instead of ToggleEntity
2015-11-19 16:54:55 -05:00
miniconfig c78899c4f3 Added support for Locks, including those connected through a wink hub. 2015-11-17 10:17:57 -05:00