core/homeassistant/components/squeezebox/coordinator.py

121 lines
4.2 KiB
Python
Raw Normal View History

Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
"""DataUpdateCoordinator for the Squeezebox integration."""
from asyncio import timeout
from collections.abc import Callable
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
from datetime import timedelta
import logging
import re
from typing import Any
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
from pysqueezebox import Player, Server
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from homeassistant.util import dt as dt_util
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
from .const import (
PLAYER_UPDATE_INTERVAL,
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
SENSOR_UPDATE_INTERVAL,
SIGNAL_PLAYER_REDISCOVERED,
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
STATUS_API_TIMEOUT,
STATUS_SENSOR_LASTSCAN,
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
STATUS_SENSOR_NEEDSRESTART,
STATUS_SENSOR_RESCAN,
)
_LOGGER = logging.getLogger(__name__)
class LMSStatusDataUpdateCoordinator(DataUpdateCoordinator):
"""LMS Status custom coordinator."""
def __init__(self, hass: HomeAssistant, lms: Server) -> None:
"""Initialize my coordinator."""
super().__init__(
hass,
_LOGGER,
name=lms.name,
update_interval=timedelta(seconds=SENSOR_UPDATE_INTERVAL),
always_update=False,
)
self.lms = lms
self.newversion_regex = re.compile("<.*$")
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
async def _async_update_data(self) -> dict:
"""Fetch data from LMS status call.
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
Then we process only a subset to make then nice for HA
"""
async with timeout(STATUS_API_TIMEOUT):
data = await self.lms.async_status()
if not data:
raise UpdateFailed("No data from status poll")
_LOGGER.debug("Raw serverstatus %s=%s", self.lms.name, data)
return self._prepare_status_data(data)
def _prepare_status_data(self, data: dict) -> dict:
"""Sensors that need the data changing for HA presentation."""
# Binary sensors
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
# rescan bool are we rescanning alter poll not present if false
data[STATUS_SENSOR_RESCAN] = STATUS_SENSOR_RESCAN in data
# needsrestart bool pending lms plugin updates not present if false
data[STATUS_SENSOR_NEEDSRESTART] = STATUS_SENSOR_NEEDSRESTART in data
# Sensors that need special handling
# 'lastscan': '1718431678', epoc -> ISO 8601 not always present
data[STATUS_SENSOR_LASTSCAN] = (
dt_util.utc_from_timestamp(int(data[STATUS_SENSOR_LASTSCAN]))
if STATUS_SENSOR_LASTSCAN in data
else None
)
Add Squeezebox server service binary sensors (#122473) * squeezebox add binary sensor + coordinator * squeezebox add connected via for media_player * squeezebox add Player type for player * Add more type info * Fix linter errors * squeezebox use our own status entity * squeezebox rework device handling based on freedback * Fix device creation * squeezebox rework coordinator error handling * Fix lint type error * Correct spelling * Correct spelling * remove large comments * insert small comment * add translation support * Simply sensor * clean update function, minimise comments to the useful bits * Fix after testing * Update homeassistant/components/squeezebox/entity.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * move data prep out of Device assign for clarity * stop being a generic api * Humans need to read the sensors... * ruff format * Humans need to read the sensors... * Revert "ruff format" This reverts commit 8fcb8143e7c4427e75d31f9dd57f6c2027f8df6a. * ruff format * Humans need to read the sensors... * errors after testing * infered * drop context * cutdown coordinator for the binary sensors * add tests for binary sensors * Fix import * add some basic media_player tests * Fix spelling and file headers * Fix spelling * remove uuid and use service device cat * use diag device * assert execpted value * ruff format * Update homeassistant/components/squeezebox/__init__.py Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Simplify T/F * Fix file header * remove redudant check * remove player tests from this commit * Fix formatting * remove unused * Fix function Type * Fix Any to bool * Fix browser tests * Patch our squeebox componemt not the server in the lib * ruff --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-05 14:49:07 +00:00
_LOGGER.debug("Processed serverstatus %s=%s", self.lms.name, data)
return data
class SqueezeBoxPlayerUpdateCoordinator(DataUpdateCoordinator[dict[str, Any]]):
"""Coordinator for Squeezebox players."""
def __init__(self, hass: HomeAssistant, player: Player, server_uuid: str) -> None:
"""Initialize the coordinator."""
super().__init__(
hass,
_LOGGER,
name=player.name,
update_interval=timedelta(seconds=PLAYER_UPDATE_INTERVAL),
always_update=True,
)
self.player = player
self.available = True
self._remove_dispatcher: Callable | None = None
self.server_uuid = server_uuid
async def _async_update_data(self) -> dict[str, Any]:
"""Update Player if available, or listen for rediscovery if not."""
if self.available:
# Only update players available at last update, unavailable players are rediscovered instead
await self.player.async_update()
if self.player.connected is False:
_LOGGER.debug("Player %s is not available", self.name)
self.available = False
# start listening for restored players
self._remove_dispatcher = async_dispatcher_connect(
self.hass, SIGNAL_PLAYER_REDISCOVERED, self.rediscovered
)
return {}
@callback
def rediscovered(self, unique_id: str, connected: bool) -> None:
"""Make a player available again."""
if unique_id == self.player.player_id and connected:
self.available = True
_LOGGER.debug("Player %s is available again", self.name)
if self._remove_dispatcher:
self._remove_dispatcher()