Commit Graph

78 Commits (a2730fb29d430a22d3059bf68a6bc13fdb2ccf8b)

Author SHA1 Message Date
Daniel J. Kemp 86199c8277 Add onkyo receiver, and source select support
Added onkyo receiver component

Added support for input source selection to media players,
and do the onkyo receiver component.
2016-03-29 22:17:36 -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 4f536ac63d Fix PEP257 issues 2016-03-07 23:39:52 +01:00
Paulus Schoutsen e80309c03c Fix imports (using isort) 2016-02-18 21:27:50 -08:00
Paulus Schoutsen 1571b33e4a Fix: state_as_number always return float 2016-02-13 00:08:32 -08:00
Dan Smith 3aa34deaa2 Add state_as_number() helper
This adds state_as_number(), a helper method that tries to interpret
state as a number, for cases we can predict. It's a generalization of
what is copy-and-paste-ed into multiple other places.
2016-02-12 00:41:32 +00:00
Paulus Schoutsen b0948bef5f Make State class immutable 2016-02-09 23:27:01 -08:00
Paulus Schoutsen 736183e6f5 Fix bug in reproduce_state with complex state attributes 2016-01-03 11:27:30 -08:00
Paulus Schoutsen f8b2570cb3 Group entities when reproducing a state 2016-01-03 02:32:09 -08:00
Jon Maddox 45f0911640 move play_media to the top so it catches first 2015-10-08 20:37:59 -04:00
Jon Maddox 26939ce554 style 2015-10-07 01:37:40 -04:00
Jon Maddox dbcc3a76ea style 2015-10-07 01:29:55 -04:00
Jon Maddox 6c4b2fd638 derp 2015-10-07 01:01:25 -04:00
Jon Maddox 6afb846d04 avoid key errors 2015-10-07 00:56:14 -04:00
Jon Maddox ad549be353 support play_media for state restoration (for scenes) 2015-10-07 00:39:38 -04:00
Paulus Schoutsen 3625646c34 Fix reproduce_state 2015-09-23 23:35:08 -07:00
Jon Maddox efdd0c9e8a don't break the chain 2015-09-24 01:35:08 -04:00
Jon Maddox 8d42e42230 style 2015-09-24 00:38:18 -04:00
Jon Maddox 90f35b35cd moar derp 2015-09-24 00:20:17 -04:00
Jon Maddox 082920abe0 moar constants 2015-09-24 00:20:05 -04:00
Jon Maddox 4a8bbc52e0 derp 2015-09-24 00:15:36 -04:00
Jon Maddox 1674c8309a Support playing, pausing states for media players when reproducing state
This allows the state helper to call the correct service call for
media_players when attempting to resolve state.
2015-09-24 00:06:05 -04:00
Paulus Schoutsen 5af1643297 Add warning when entity not found in reproduce_state 2015-09-15 22:23:07 -07:00
Paulus Schoutsen 1b89a502c4 Extract core into own submodule 2015-08-16 20:44:46 -07:00
Paulus Schoutsen e0468f8b8e Extract helpers.event from core + misc cleanup 2015-07-26 10:45:49 +02:00
Paulus Schoutsen e0ecb64a10 Use UTC as the internal datetime format 2015-04-28 19:12:05 -07:00
Paulus Schoutsen 1245af356b Scene bugfixes and UI improvements 2015-03-16 23:32:18 -07:00
Paulus Schoutsen 19a43cea26 Add scene component 2015-03-15 23:36:42 -07:00