don't break the chain
This commit is contained in:
parent
8d42e42230
commit
efdd0c9e8a
1 changed files with 7 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue