don't break the chain

This commit is contained in:
Jon Maddox 2015-09-24 01:35:08 -04:00
parent 8d42e42230
commit efdd0c9e8a

View file

@ -61,14 +61,13 @@ def reproduce_state(hass, states, blocking=False):
service = SERVICE_MEDIA_PAUSE service = SERVICE_MEDIA_PAUSE
elif state.domain == 'media_player' and state == STATE_PLAYING: elif state.domain == 'media_player' and state == STATE_PLAYING:
service = SERVICE_MEDIA_PLAY service = SERVICE_MEDIA_PLAY
else: elif state.state == STATE_ON:
if state.state == STATE_ON:
service = SERVICE_TURN_ON service = SERVICE_TURN_ON
elif state.state == STATE_OFF: elif state.state == STATE_OFF:
service = SERVICE_TURN_OFF service = SERVICE_TURN_OFF
else: else:
_LOGGER.warning("reproduce_state: Unable to reproduce \ _LOGGER.warning("reproduce_state: Unable to reproduce state %s",
state %s", state) state)
continue continue
service_data = dict(state.attributes) service_data = dict(state.attributes)