From 5af16432976f72de1d86f1d725205c4ec6a6caa2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 15 Sep 2015 22:23:07 -0700 Subject: [PATCH] Add warning when entity not found in reproduce_state --- homeassistant/helpers/state.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/helpers/state.py b/homeassistant/helpers/state.py index d87ee48930c..d4a18806a17 100644 --- a/homeassistant/helpers/state.py +++ b/homeassistant/helpers/state.py @@ -51,6 +51,8 @@ def reproduce_state(hass, states, blocking=False): current_state = hass.states.get(state.entity_id) if current_state is None: + _LOGGER.warning('reproduce_state: Unable to find entity %s', + state.entity_id) continue if state.state == STATE_ON: @@ -58,7 +60,8 @@ def reproduce_state(hass, states, blocking=False): elif state.state == STATE_OFF: service = SERVICE_TURN_OFF else: - _LOGGER.warning("Unable to reproduce state for %s", state) + _LOGGER.warning("reproduce_state: Unable to reproduce state %s", + state) continue service_data = dict(state.attributes)