@callback
def async_on_remove(self, func: CALLBACK_TYPE) -> None:
    'Add a function to call when entity is removed or not added.'
    if (self._on_remove is None):
        self._on_remove = []
    self._on_remove.append(func)
Add a function to call when entity is removed or not added.
@callback
def async_on_remove(self, func: CALLBACK_TYPE) -> None:
    
    if (self._on_remove is None):
        self._on_remove = []
    self._on_remove.append(func)