core/homeassistant/components/media_player
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
..
__init__.py Refactor reproduce_state for scene component 2016-03-09 18:52:05 +01:00
cast.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
demo.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
denon.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
firetv.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
itunes.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
kodi.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
mpd.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
plex.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
samsungtv.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
services.yaml Add service descriptions 2015-09-26 23:17:04 -07:00
snapcast.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
sonos.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
squeezebox.py Fix PEP257 issues 2016-03-08 10:34:33 +01:00
universal.py Refactor reproduce_state for scene component 2016-03-09 18:52:05 +01:00