Add Context support for async_entity removal (#33209)

* Add Context for async_remove

* Check context in state automation on entity removal
This commit is contained in:
Eugenio Panadero authored and GitHub committed 2020-03-24 09:59:17 -07:00
1 parent aec2fe86e4
commit fb22f6c301
7 files changed
+13 -9

No files matched your search

@@ -158,7 +158,7 @@ async def async_setup(hass: HomeAssistant, config: dict) -> bool:
if entity_id not in persistent_notifications:
return
hass.states.async_remove(entity_id)
hass.states.async_remove(entity_id, call.context)
del persistent_notifications[entity_id]
hass.bus.async_fire(EVENT_PERSISTENT_NOTIFICATIONS_UPDATED)