Fix GeoNet NZ Quakes tests (#33383)

* enable tests

* only remove entity if exists
This commit is contained in:
Malte Franken authored and GitHub committed 2020-03-29 22:40:09 +02:00
1 parent ad3c5240c2
commit de54659097
2 files changed
+2 -3

No files matched your search

@@ -96,7 +96,8 @@ class GeonetnzQuakesEvent(GeolocationEvent):
self._remove_signal_update()
# Remove from entity registry.
entity_registry = await async_get_registry(self.hass)
entity_registry.async_remove(self.entity_id)
if self.entity_id in entity_registry.entities:
entity_registry.async_remove(self.entity_id)
@callback
def _delete_callback(self):