diff --git a/homeassistant/components/demo/event.py b/homeassistant/components/demo/event.py index 0a8e2e983f5c..2dbb79d8dd3d 100644 --- a/homeassistant/components/demo/event.py +++ b/homeassistant/components/demo/event.py @@ -40,7 +40,9 @@ class DemoEvent(EventEntity): @override async def async_added_to_hass(self) -> None: """Register callbacks.""" - self.hass.bus.async_listen("demo_button_pressed", self._async_handle_event) + self.async_on_remove( + self.hass.bus.async_listen("demo_button_pressed", self._async_handle_event) + ) @callback def _async_handle_event(self, _: Event) -> None: