async def METHOD_NAME(self, state: XknxConnectionState) -> None:
    """Handle connection state changes."""
    for task in self.tasks:
        if state == XknxConnectionState.CONNECTED:
            task.reconnected()
        else:
            task.connection_lost()