Commit Graph

12 Commits (f47572d3c0b81f73be41e8161e32e42be14c164f)

Author SHA1 Message Date
Fabian Affolter a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Martin Hjelmare 7c614a6738 Add voluptuous config validation to scenes (#6830)
* Add platform schema to scene component and homeassistant platform.
* Clean up code and add constants.
* Add unit test and clean up tests.
2017-03-28 23:39:53 -07:00
Pascal Vizeli 41f558b181 Bootstrap / Component setup async (#6264)
* Bootstrap / Entiy setup async

* Cleanup add_job stuff / return task/future object

* Address paulus comments / part 1

* fix install pip

* Cleanup bootstrap / move config stuff to config.py

* Make demo async

* Further bootstrap improvement

* Address Martin's comments

* Fix initial tests

* Fix final tests

* Fix bug with prepare loader

* Remove no longer needed things

* Log error when invalid config

* More cleanup

* Cleanups platform events & fix lint

* Use a non blocking add_entities callback for platform

* Fix Autoamtion is setup befor entity is ready

* Better automation fix

* Address paulus comments

* Typo

* fix lint

* rename functions

* fix tests

* fix test

* change exceptions

* fix spell
2017-02-28 20:33:19 -08:00
Pascal Vizeli 2e6a48ff5f WIP: Migrate scene to async + homeassistant scene async (#4665)
* Migrate scene to async + homeassistant scene async

* fix lint

* Update state.py

* Fix tests
2016-12-01 21:38:12 -08: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 1b8b2acb51 Fix PEP257 issues 2016-03-07 22:50:56 +01:00
sander 0f6ec9b7ac Added your suggestions.
Looking at your code suggestion below I am not sure exactly how other people might want to put in lists. (But I am missing a more general overview of the code)

 ```
if not isinstance(scene_config,list):
  scene_config=[scene_config]
```

But it is there !
And changed "config" to "states" !
2016-02-28 21:00:51 +01:00
sander a8edcfd315 removed logger.
I guess I should add some error checking, but I'd like you to okay this code first.
2016-02-28 10:29:21 +01:00
sander 0193454064 removed logger.
I guess I should add some error checking, but I'd like you to okay this code first.
2016-02-28 10:28:34 +01:00
sander 94633b3795 1. added platform per scene entry.
2. changed homeassistant scene setup_platform method to work with 1.
2016-02-28 10:24:02 +01:00
sander 88e7967a7d - removed update method
- removed failing tests from test_scene
2016-02-22 22:01:05 +01:00
sander fb449cbc82 first commit 2016-02-22 19:53:55 +01:00