change and condition to or condition (#25374)

This commit is contained in:
David F. Mulcahey 2019-07-21 12:57:40 -04:00 committed by Paulus Schoutsen
parent aa27e22b17
commit 0653f57fb4

View File

@ -433,7 +433,7 @@ class Entity:
async def _async_registry_updated(self, event):
"""Handle entity registry update."""
data = event.data
if data['action'] != 'update' and data.get(
if data['action'] != 'update' or data.get(
'old_entity_id', data['entity_id']) != self.entity_id:
return