Skip to content

Commit 95caa8f

Browse files
authored
Update __init__.py
Still seeing a KeyError as per #23 Suppressing the KeyError on 392 returns functionality.
1 parent 9149323 commit 95caa8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/remote_homeassistant/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def fire_event(message):
389389
if not data['new_state']:
390390
entity_id = self._prefixed_entity_id(entity_id)
391391
# entity was removed in the remote instance
392-
with suppress(ValueError, AttributeError):
392+
with suppress(ValueError, AttributeError, KeyError):
393393
self._entities.remove(entity_id)
394394
self._hass.states.async_remove(entity_id)
395395
return

0 commit comments

Comments
 (0)