mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
bugfix: set_state updated state if not changed
This commit is contained in:
@@ -379,8 +379,6 @@ class StateMachine(object):
|
||||
|
||||
attributes = attributes or {}
|
||||
|
||||
state = State(new_state, attributes)
|
||||
|
||||
with self.lock:
|
||||
# Change state and fire listeners
|
||||
try:
|
||||
@@ -388,7 +386,7 @@ class StateMachine(object):
|
||||
|
||||
except KeyError:
|
||||
# If state did not exist yet
|
||||
pass
|
||||
self.states[entity_id] = State(new_state, attributes)
|
||||
|
||||
else:
|
||||
if old_state.state != new_state or \
|
||||
|
Reference in New Issue
Block a user