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
elif state.domain == 'media_player' and state == STATE_PLAYING:
service = SERVICE_MEDIA_PLAY
else:
if state.state == STATE_ON:
elif state.state == STATE_ON:
service = SERVICE_TURN_ON
elif state.state == STATE_OFF:
service = SERVICE_TURN_OFF
else:
_LOGGER.warning("reproduce_state: Unable to reproduce \
state %s", state)
_LOGGER.warning("reproduce_state: Unable to reproduce state %s",
state)
continue
service_data = dict(state.attributes)