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:
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)
|
||||
|
||||
Reference in new issue
Block a user