From afc602595b50a08a33b31566a736dd68d2ae9389 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 14 Oct 2020 04:06:51 -0500 Subject: [PATCH] Only validate entity id if it did not exist on state change (#41820) --- homeassistant/core.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/homeassistant/core.py b/homeassistant/core.py index fa0e294e52e..795a67f3f19 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -1148,7 +1148,15 @@ class StateMachine: if context is None: context = Context() - state = State(entity_id, new_state, attributes, last_changed, None, context) + state = State( + entity_id, + new_state, + attributes, + last_changed, + None, + context, + old_state is None, + ) self._states[entity_id] = state self._bus.async_fire( EVENT_STATE_CHANGED,